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

Method _remove_unreachable

Tools/jit/_optimizers.py:456–471  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

454 return live
455
456 def _remove_unreachable(self) -> None:
457 live = self._find_live_blocks()
458 continuation = self._lookup_label(f"{self.label_prefix}_JIT_CONTINUE")
459 # Keep blocks after continuation as they may contain data and
460 # metadata that the assembler needs
461 prev: _Block | None = None
462 block = self._root
463 while block is not continuation:
464 next = block.link
465 assert next is not None
466 if not block in live and prev:
467 prev.link = next
468 else:
469 prev = block
470 block = next
471 assert prev.link is block
472
473 def _fixup_external_labels(self) -> None:
474 if self._supports_external_relocations:

Callers 1

runMethod · 0.95

Calls 2

_find_live_blocksMethod · 0.95
_lookup_labelMethod · 0.95

Tested by

no test coverage detected