[PATCH] D28694: Add pass insertion point EP_BeforeLoopIdiom

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 20 06:41:57 PST 2017


kparzysz added inline comments.


================
Comment at: tools/opt/opt.cpp:292-301
     Builder.addExtension(
         PassManagerBuilder::EP_EarlyAsPossible,
         [&](const PassManagerBuilder &, legacy::PassManagerBase &PM) {
           TM->addEarlyAsPossiblePasses(PM);
         });
+    Builder.addExtension(
+        PassManagerBuilder::EP_BeforeLoopIdiom,
----------------
chandlerc wrote:
> If we go this way, I worry we're just bugging for a third...
> 
> What about instead you call a method on TargetMachine with the builder that can add any extensions it wants. Then all of this gets sunk into the TM. You can subsume both early-as-possible and the late-loop extensions into this one API. Does that make sense to others?
It makes sense to me. There is already a review for doing that (by someone else): D28336.


Repository:
  rL LLVM

https://reviews.llvm.org/D28694





More information about the llvm-commits mailing list