We'd like to determine the idom of exit block after peeling one iteration.
Let Exit is exit block.
Let ExitingSet - is a set of predecessors of Exit block. They are exiting blocks.
Let Latch' and ExitingSet' are copies after a peeling.
We'd like to find an idom'(Exit) - idom of Exit after peeling.
It is an evident that idom'(Exit) will be the nearest common dominator of ExitingSet and ExitingSet'.
idom(Exit) is a nearest common dominator of ExitingSet.
idom(Exit)' is a nearest common dominator of ExitingSet'.
Taking into account that we have a single Latch, Latch' will dominate Header and idom(Exit).
So the idom'(Exit) is nearest common dominator of idom(Exit)' and Latch'.
All these basic blocks are in the same loop, so what we find is
(nearest common dominator of idom(Exit) and Latch)'.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-idom-2.ll | ||
---|---|---|
2 ↗ | (On Diff #211786) | I *think* if you pass -verify-dom-info, you do not require asserts for the assertion in LoopUnrollPeel.cpp:735. It will verify the DT after unrolling/peeling, which should be sufficient. |
llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-idom-2.ll | ||
---|---|---|
2 ↗ | (On Diff #211786) | ah you check the debug output, never mind. |
llvm/test/Transforms/LoopUnroll/peel-loop-pgo-deopt-idom-2.ll | ||
---|---|---|
2 ↗ | (On Diff #211786) | I need |