Skip to content

Commit dd8c3f8

Browse files
authored
JIT: Update terminology in loop cloning, and simplify a bit (#95648)
Update some terminology in loop cloning; rewrite docs to be less "lexical" oriented; move responsibility of maintenance of old preheader -> first cond link out of `CondToStmtInBlock`.
1 parent 8383c97 commit dd8c3f8

File tree

2 files changed

+157
-177
lines changed

2 files changed

+157
-177
lines changed

src/coreclr/jit/flowgraph.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4009,6 +4009,10 @@ void Compiler::fgLclFldAssign(unsigned lclNum)
40094009
// Return Value:
40104010
// True if the block is reachable from the root.
40114011
//
4012+
// Remarks:
4013+
// If the block was added after the DFS tree was computed, then this
4014+
// function returns false.
4015+
//
40124016
bool FlowGraphDfsTree::Contains(BasicBlock* block) const
40134017
{
40144018
return (block->bbNewPostorderNum < m_postOrderCount) && (m_postOrder[block->bbNewPostorderNum] == block);
@@ -4213,6 +4217,11 @@ BitVecTraits FlowGraphNaturalLoop::LoopBlockTraits()
42134217
//
42144218
bool FlowGraphNaturalLoop::ContainsBlock(BasicBlock* block)
42154219
{
4220+
if (!m_dfsTree->Contains(block))
4221+
{
4222+
return false;
4223+
}
4224+
42164225
unsigned index;
42174226
if (!TryGetLoopBlockBitVecIndex(block, &index))
42184227
{

0 commit comments

Comments
 (0)