Run this optimizer.
(self)
| 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 | |
| 584 | class OptimizerAArch64(Optimizer): # pylint: disable = too-few-public-methods |