[PATCH] D11421: New interface to enable shrink wrapping

Bill Schmidt wschmidt at linux.vnet.ibm.com
Fri Jul 24 13:08:02 PDT 2015

wschmidt added inline comments.

Comment at: lib/CodeGen/Passes.cpp:539
@@ -541,4 +538,3 @@
   // Insert prolog/epilog code.  Eliminate abstract frame index references...
-  if (getEnableShrinkWrap())
-    addPass(&ShrinkWrapID);
+  addPass(createShrinkWrapPass());
kbarton wrote:
> This will add shrink wrapping all the time. I think it makes more sense to guard this by (getOptLevel() != CodeGenOpt::None),  as is done below for addMachineLateOptimization().
> I will make this change in the next revision. 
Depending on the computational complexity of shrink wrapping, you may want to enable this at -O2 and up rather than -O1.  I haven't looked at the code, but I assume Quentin can advise.


More information about the llvm-commits mailing list