Uh oh!
There was an error while loading. Please reload this page.
GH-132732: Use pure op machinery to optimize various instructions with _POP_TOP and _POP_TWO - #137577
Conversation
_POP_TOP and _POP_TWO relevant instructions_POP_TOP and _POP_TWO
brandtbucher
left a comment
There was a problem hiding this comment.
This is super cool! Just a quick run-through for now:
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When you're done making the requested changes, leave the comment: |
Fidget-Spinner
left a comment
There was a problem hiding this comment.
Very cool, just one nit.
Uh oh!
There was an error while loading. Please reload this page.
savannahostrowski
commented
Aug 21, 2025
@brandtbucher Do you want to take another look at this? |
brandtbucher
left a comment
There was a problem hiding this comment.
Looks good! Just a few suggestions for comments and cleaning up the generated code.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if (sym_is_const(ctx, res)) { | ||
| PyObject *result = sym_get_const(ctx, res); | ||
| if (_Py_IsImmortal(result)) { | ||
| // Replace with _POP_TOP_LOAD_CONST_INLINE_BORROW since we have one input and an immortal result | ||
| REPLACE_OP(this_instr, _POP_TOP_LOAD_CONST_INLINE_BORROW, 0, (uintptr_t)result); | ||
| } | ||
| } |
There was a problem hiding this comment.
Still seeing weird indent here, maybe dedent the string in the cases generator?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.