[PATCH] D28031: Allow target to specify early module passes
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 14:18:25 PST 2017
rampitec added a comment.
What I can also do is to stop using extensions at all. I.e. write this into opt.cpp and BackendUtil.cpp:
if (OptLevelO3)
AddOptimizationPasses(Passes, *FPasses, TM.get(), 3, 0);
+ // Add target-specific passes that need to run as early as possible.
+ if (TM) {
+ legacy::PassManager EarlyPasses;
+ TM->addEarlyAsPossiblePasses(EarlyPasses);
+ EarlyPasses.run(*M);
+ }
+
if (FPasses) {
FPasses->doInitialization();
Repository:
rL LLVM
https://reviews.llvm.org/D28031
More information about the llvm-commits
mailing list