[llvm-commits] [PATCH] [IPO] enable EP_EnabledOnOptLevel0 passes for OptLevel > 0
Saleem Abdulrasool
compnerd at compnerd.org
Mon Dec 24 12:17:18 PST 2012
If an extension pass is registered as EP_EnabledOnOptLevel0, they would be
disabled previously as for OptLevel > 0, the passes were not added to the
appropriate pass manager. This registers the passes after the inliner as is
done in the OptLevel == 0 case.
http://llvm-reviews.chandlerc.com/D237
Files:
lib/Transforms/IPO/PassManagerBuilder.cpp
Index: lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- lib/Transforms/IPO/PassManagerBuilder.cpp
+++ lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -157,6 +157,12 @@
MPM.add(Inliner);
Inliner = 0;
}
+
+ // Add extensions which are enabled at optimisation level 0 or greater. This
+ // is "duplicated" since for OptLevel > 0 the passes registered as
+ // EP_EnabledOnOptLevel0 are not inserted into the appropriate Pass Manager.
+ addExtensionsToPM(EP_EnabledOnOptLevel0, MPM);
+
if (!DisableUnitAtATime)
MPM.add(createFunctionAttrsPass()); // Set readonly/readnone attrs
if (OptLevel > 2)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D237.1.patch
Type: text/x-patch
Size: 688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121224/1db1a8fb/attachment.bin>
More information about the llvm-commits
mailing list