bpo-29469: Remove unnecessary peephole optimizer#4863
Conversation
Conversions like `not a is b -> a is not b` are implemented in AST optimizer in previous commit. So this commit removes them from peephole optimizer.
|
See also Raymond's comment on the tracker. |
|
I saw it but I don't understand it yet. |
|
Are |
|
I'm reading it now. |
|
I did it, but importlib.h and importlib_external.h has changed. |
|
You have removed the optimization for |
|
Removing BUILD_TUPLE folding makes regression on MAKE_FUNCTION: before: after: |
|
Oh, right. And this can't be moved to the AST level. Thus tuple constants folding should be kept. It can be moved to the compiler lever, but this is a separate complex issue. |
|
Maybe, I need to re-implement fold_tuple_on_constants() to export consts from |
a29ac14 to
19b2fa8
Compare
Conversions like
not a is b -> a is not bare implementedin AST optimizer in 7ea143a.
This commit removes them from peephole optimizer.
https://bugs.python.org/issue29469