MCPcopy Index your code
hub / github.com/python/cpython / run

Method run

Tools/jit/_optimizers.py:568–581  ·  view source on GitHub ↗

Run this optimizer.

(self)

Source from the content-addressed store, hash-verified

566 ), "Frame pointer should not be modified"
567
568 def run(self) -> None:
569 """Run this optimizer."""
570 self._insert_continue_label()
571 self._mark_hot_blocks()
572 # Removing branches can expose opportunities for more branch removal.
573 # Repeat a few times. 2 would probably do, but it's fast enough with 4.
574 for _ in range(4):
575 self._invert_hot_branches()
576 self._remove_redundant_jumps()
577 self._remove_unreachable()
578 self._fixup_external_labels()
579 self._fixup_constants()
580 self._validate()
581 self.path.write_text(self._body())
582
583
584class OptimizerAArch64(Optimizer): # pylint: disable = too-few-public-methods

Callers 6

runClickedMethod · 0.45
_run_quietFunction · 0.45
_parseMethod · 0.45
_compileMethod · 0.45
buildMethod · 0.45
run_cmdFunction · 0.45

Calls 10

_mark_hot_blocksMethod · 0.95
_invert_hot_branchesMethod · 0.95
_remove_unreachableMethod · 0.95
_fixup_constantsMethod · 0.95
_validateMethod · 0.95
_bodyMethod · 0.95
write_textMethod · 0.45

Tested by 1

runClickedMethod · 0.36