From 575cf22b864e102538978f1377eae09cac5eadef Mon Sep 17 00:00:00 2001 From: Kunal Pathak Date: Wed, 8 Jun 2022 09:44:00 -0700 Subject: [PATCH] Remove reversal of loop processing order --- src/coreclr/jit/gentree.cpp | 2 +- src/coreclr/jit/optimizer.cpp | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/coreclr/jit/gentree.cpp b/src/coreclr/jit/gentree.cpp index a42a72934033c..98619702deaf2 100644 --- a/src/coreclr/jit/gentree.cpp +++ b/src/coreclr/jit/gentree.cpp @@ -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 diff --git a/src/coreclr/jit/optimizer.cpp b/src/coreclr/jit/optimizer.cpp index 38eb0a7907ca9..dd5c34a8363f3 100644 --- a/src/coreclr/jit/optimizer.cpp +++ b/src/coreclr/jit/optimizer.cpp @@ -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 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)