================
@@ -545,11 +551,18 @@ bool LoopInvariantCodeMotion::runOnLoop(Loop *L, 
AAResults *AA, LoopInfo *LI,
   assert((L->isOutermost() || L->getParentLoop()->isLCSSAForm(*DT)) &&
          "Parent loop not left in LCSSA form after LICM!");
 
+  // sink pre-header defs that are unused in-loop into the unique exit to 
reduce
+  // pressure.
+  Flags.setIsSink(true);
+  Changed |= sinkUnusedInvariantsFromPreheaderToExit(L, AA, &SafetyInfo, MSSAU,
+                                                     SE, DT, Flags, ORE);
+
   if (VerifyMemorySSA)
     MSSA->verifyMemorySSA();
 
   if (Changed && SE)
     SE->forgetLoopDispositions();
+
----------------
srpande wrote:

no need for new line.

https://github.com/llvm/llvm-project/pull/157559
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to