gh-126835: Move optimization of constant sequence creation from codegen to CFG#129426
gh-126835: Move optimization of constant sequence creation from codegen to CFG#129426Eclips4 merged 16 commits into
Conversation
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
WolframAlph
left a comment
There was a problem hiding this comment.
Some questions, suggestions and nitpicks.
Sorry, something went wrong.
Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
WolframAlph
left a comment
There was a problem hiding this comment.
Looks good to me
Sorry, something went wrong.
iritkatriel
left a comment
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
|
@Eclips4 , all tests pass when I disable this optimization. Is it intended? Shouldn't we have some tests for this? |
Sorry, something went wrong.
Yes, it's expected. There are existing tests that test this. You can see one of them in this PR, which I needed to tweak. |
Sorry, something went wrong.
… codegen to CFG (python#129426) Codegen phase has an optimization that transforms ``` LOAD_CONST x LOAD_CONST y LOAD_CONXT z BUILD_LIST/BUILD_SET (3) ``` -> ``` BUILD_LIST/BUILD_SET (0) LOAD_CONST (x, y, z) LIST_EXTEND/SET_UPDATE 1 ``` This optimization has now been moved to CFG phase to make python#128802 work. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
edited by bedevere-app
Bot
LoadingUh oh!
There was an error while loading. Please reload this page.
Copy link Copy MarkdownSorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.