Skip to content

Commit

Permalink
Remove reversal of loop processing order
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalspathak committed Jun 8, 2022
1 parent c66bb7d commit 575cf22
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 1 addition & 1 deletion src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4520,7 +4520,7 @@ unsigned Compiler::gtSetEvalOrder(GenTree* tree)
// We generate `xorp* tgtReg, tgtReg` which is 3-5 bytes
// but which can be elided by the instruction decoder.

costEx = 1;
costEx = 1; //2;
costSz = 2;
}
else
Expand Down
9 changes: 0 additions & 9 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6287,18 +6287,9 @@ void Compiler::optHoistLoopNest(unsigned lnum, LoopHoistContext* hoistCtxt)
BitVecTraits m_visitedTraits(fgBBNumMax * 2, this);
BitVec m_visited(BitVecOps::MakeEmpty(&m_visitedTraits));

// Since loops in optLoopTable are arranged in reverse execution order, arrange
// them back in execution order before processing.
ArrayStack<unsigned> childLoops(getAllocatorLoopHoist());
for (unsigned child = optLoopTable[lnum].lpChild; child != BasicBlock::NOT_IN_LOOP;
child = optLoopTable[child].lpSibling)
{
childLoops.Push(child);
}

while (!childLoops.Empty())
{
unsigned child = childLoops.Pop();
optHoistLoopNest(child, hoistCtxt);

if (optLoopTable[child].lpFlags & LPFLG_HAS_PREHEAD)
Expand Down

0 comments on commit 575cf22

Please sign in to comment.