MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / get_iterated_dominance_frontier

Method get_iterated_dominance_frontier

python/basicblock.py:557–567  ·  view source on GitHub ↗

Calculates the iterated dominance frontier of the given blocks (this is used to determine φ node placement)

(self, blocks: List['BasicBlock'])

Source from the content-addressed store, hash-verified

555 return core.BNIsHighLevelILBasicBlock(self.handle)
556
557 def get_iterated_dominance_frontier(self, blocks: List['BasicBlock']) -> List['BasicBlock']:
558 """Calculates the iterated dominance frontier of the given blocks (this is used to determine φ node placement)"""
559 if len(blocks) == 0:
560 return []
561
562 block_set = (ctypes.POINTER(core.BNBasicBlock) * len(blocks))() # type: ignore
563 for i in range(len(blocks)):
564 block_set[i] = blocks[i].handle
565 count = ctypes.c_ulonglong()
566 out_blocks = core.BNGetBasicBlockIteratedDominanceFrontier(block_set, len(blocks), count)
567 return self._make_blocks(out_blocks, count.value)
568
569 def mark_recent_use(self) -> None:
570 core.BNMarkBasicBlockAsRecentlyUsed(self.handle)

Callers

nothing calls this directly

Calls 1

_make_blocksMethod · 0.95

Tested by

no test coverage detected