Commit deca26f
committed
[Custom Descriptors] Optimize descriptors in Unsubtyping
With the upcoming stricter validation rules for descriptor types, we can
no longer use the placeholder describee trick in GlobalTypeOptimization,
so its ability to optimize out unneeded descriptors will be
significantly restricted. Because of the increasing coupling between the
validation for subtyping and descriptor relationships, it makes most
sense to optimize both at the same time in Unsubtyping.
Update Unsubtyping to start the analysis assuming no descriptors are
necessary, then add them in as it discovers that they are indeed
necessary either to preserve behavior or validitiy. Discovering new
required descriptors can imply that new subtypings are necessary and
vice versa.1 parent ed83899 commit deca26f
4 files changed
Lines changed: 1282 additions & 86 deletions
File tree
- src
- ir
- passes
- support
- test/lit/passes
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
315 | | - | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
316 | 324 | | |
317 | 325 | | |
318 | 326 | | |
| |||
0 commit comments