gh-120619: Strength reduce function guards, support 2-operand instruction forms#124846
gh-120619: Strength reduce function guards, support 2-operand instruction forms#124846Fidget-Spinner merged 12 commits intopython:mainfrom
Conversation
|
@markshannon can you please bengmchmark this? |
|
No significant performance impact, 0.3% faster on average. |
markshannon
left a comment
There was a problem hiding this comment.
Looks generally sound.
One assert and comment seem incorrect.
Maybe rename operand to operand0 if we are adding operand1
|
When you're done making the requested changes, leave the comment: |
markshannon
left a comment
There was a problem hiding this comment.
There's a test that can be removed, otherwise LGTM.
|
Looks good to me. @brandtbucher can you approve if you are happy with the JIT changes? |
brandtbucher
left a comment
There was a problem hiding this comment.
JIT changes look good, just a couple out-of-date comments:
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
…op forms (pythonGH-124846) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
…op forms (pythonGH-124846) Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
_CHECK_FUNCTION_EXACT_ARGSif we can statically determine the number of arguments at optimization time._CHECK_FUNCTION_VERSIONto not need to read the stack operands. To do this, we need a 2-operand form of uops. This PR thus adds support for that.Altogether, these prepare it for partial evaluation in the future, as after removing these guards, this means the inputs do not need to be materialized.