You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[mypyc] Try adjusting error kinds for all blocks (#15262)
`adjust_error_kinds()` should be run over every block, but the old impl.
of `insert_exception_handling()` would stop iterating over blocks once
it generated a default error handler. This made sense for its original
purpose, but unfortunately limits the effectiveness of
`adjust_error_kinds()`.
Changing `insert_exception_handling()` to loop over every block no
matter what also means we can get rid of the weird GetAttr special
casing in the branch emit logic (stumbling across that is what made me
investigate in the first place!).
This reduces self-compile LOC by 1.1% in my experiments (avoiding error
branches sometimes eliminates register assignments or on-error
decrefs... according to my brief look through the C diff between master
and this patch).
| Revision | Self-compile C LOC |
|--------|--------|
| PR | 2 265 486 (**-1.1%**) |
| Master (905c2cb) | 2 290 748 |
Notable removals in the diff (other than the all of the label
renumbering) ...[^1]


[^1]: apologies for the screenshots, this diff was generated during a
SSH session so copying and pasting is a real pain.
0 commit comments