未验证 提交 e3a20971 编写于 作者: A Andy Ayers 提交者: GitHub

JIT: break loop canonicalization into two stages (#70809)

For a given loop, we need to separate out the true backedge, any
non-loop backedges, and any inner loop backedges so that they all
target distinct blocks.

Otherwise, we may violate assumptions that the loop entry dominates
all blocks in the loop and that all backedges that reach top come
from within the loop.

This seems simplest to do with two rounds of canonicalization, one
that moves the non-loop edges, and another that moves the true backedge.

Fixes #70802.
上级 48adb84d
......@@ -6335,6 +6335,14 @@ protected:
// unshared with any other loop. Returns "true" iff the flowgraph has been modified
bool optCanonicalizeLoop(unsigned char loopInd);
enum class LoopCanonicalizationOption
{
Outer,
Current
};
bool optCanonicalizeLoopCore(unsigned char loopInd, LoopCanonicalizationOption option);
// Requires "l1" to be a valid loop table index, and not "BasicBlock::NOT_IN_LOOP".
// Requires "l2" to be a valid loop table index, or else "BasicBlock::NOT_IN_LOOP".
// Returns true iff "l2" is not NOT_IN_LOOP, and "l1" contains "l2".
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册