-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 b
are implementedin AST optimizer in 7ea143a.
This commit removes them from peephole optimizer.
https://bugs.python.org/issue29469