[PATCH] D89927: [LoopRotate][NPM] Disable header duplication under -Oz

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 22 05:34:36 PDT 2020


fhahn accepted this revision.
fhahn added a comment.
This revision is now accepted and ready to land.

LGTM, thanks! This should be in-line with the behavior of the legacy PM pipeline.



================
Comment at: llvm/lib/Passes/PassBuilder.cpp:837
   FPM.addPass(createFunctionToLoopPassAdaptor(
-      LoopRotatePass(), EnableMSSALoopDependency,
+      LoopRotatePass(Level != OptimizationLevel::Oz), EnableMSSALoopDependency,
       /*UseBlockFrequencyInfo=*/false, DebugLogging));
----------------
might be good to add a comment like `Header duplication is disabled for Oz`, like in the legacy PM.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89927/new/

https://reviews.llvm.org/D89927



More information about the llvm-commits mailing list