Commit 6afe66c
Create new block for final instructions inserted into a lambda
Summary:
CPython will usually insert a `LOAD_CONST`/`RETURN_VALUE` at the end of a lambda, and then this will get optimized away. This has a side effect of leaving a `None` const on the lambda.
We emit it in the same block currently which can prevent some other optimizations because we'll see the return block as being too large.
Reviewed By: jbower-fb
Differential Revision: D81977406
fbshipit-source-id: e6cccd87799330b3d65534f9ed6ed5c4c13b6b231 parent 0b8c532 commit 6afe66c
2 files changed
Lines changed: 5 additions & 0 deletions
File tree
- cinderx/PythonLib
- cinderx/compiler
- test_cinderx/test_compiler/testcorpus
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4547 | 4547 | | |
4548 | 4548 | | |
4549 | 4549 | | |
| 4550 | + | |
4550 | 4551 | | |
4551 | 4552 | | |
4552 | 4553 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments