◐ Shell
clean mode source ↗

gh-126835: Move optimization of constant sequence creation from codegen to CFG by Eclips4 · Pull Request #129426 · python/cpython

@Eclips4

@Eclips4

@Eclips4 Eclips4 marked this pull request as ready for review

January 29, 2025 10:45

iritkatriel

iritkatriel

@Eclips4

iritkatriel

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>

WolframAlph

Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>

@Eclips4

WolframAlph

iritkatriel

iritkatriel

@Eclips4

@Eclips4 Eclips4 deleted the move-codegen-optimization branch

February 4, 2025 17:43

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request

Feb 7, 2025
… 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>