mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-106529: Support JUMP_BACKWARD in Tier 2 (uops) (#106543)
During superblock generation, a JUMP_BACKWARD instruction is translated to either a JUMP_TO_TOP micro-op (when the target of the jump is exactly the beginning of the superblock, closing the loop), or a SAVE_IP + EXIT_TRACE pair, when the jump goes elsewhere. The new JUMP_TO_TOP instruction includes a CHECK_EVAL_BREAKER() call, so a closed loop can still be interrupted.
This commit is contained in:
parent
292ac4bfe9
commit
cabd6e8a10
5 changed files with 63 additions and 30 deletions
|
@ -1346,6 +1346,7 @@ class Analyzer:
|
|||
add("SAVE_IP")
|
||||
add("_POP_JUMP_IF_FALSE")
|
||||
add("_POP_JUMP_IF_TRUE")
|
||||
add("JUMP_TO_TOP")
|
||||
|
||||
for instr in self.instrs.values():
|
||||
if instr.kind == "op" and instr.is_viable_uop():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue