Repository navigation
Conversation
…iants Block.getPredecessors takes time quadratic in the number of predecessors, and checkInvariants called it once per edge into the block. A block such as the exceptional exit can have thousands of predecessors.
|
No actionable comments were generated in the recent review. Walkthrough
Change: Refactor Merge Risk:
|
|
Superseded by #8701, which makes |
Land before #8608.
ControlFlowGraph.checkInvariantschecks, for each edge, that the successor's predecessors contain the edge's source. It calledBlock.getPredecessorsonce per edge, andgetPredecessorstakes time quadratic in the number of predecessors. A block such as the exceptional exit can have thousands of predecessors, so this was slow on large CFGs. NowcheckInvariantscomputes each block's predecessors once, as aHashSet.There is no change in behavior. #8608 makes the CFG of
manyNestedTryFinallyBlocksincfgConstructionTestlarge enough for this to matter.