[PATCH] D11421: New interface to enable shrink wrapping

Kit Barton kbarton at ca.ibm.com
Fri Jul 24 09:02:28 PDT 2015


kbarton added inline comments.

================
Comment at: lib/CodeGen/ShrinkWrap.cpp:323
@@ -303,1 +322,3 @@
 bool ShrinkWrap::runOnMachineFunction(MachineFunction &MF) {
+  if (PredicateFtor && !PredicateFtor(MF)) 
+    return false;
----------------
nemanjai wrote:
> Does this mean that shrink wrapping will run on a passed function if the PredicateFtor is not callable? Although as currently set-up, this cannot happen.
Yes, that is true. 
I could not remove the default constructor, as it is needed somewhere else.
I could change this logic to disable Shrink Wrapping if PredicateFtor has not been set if there is a concern about this.


http://reviews.llvm.org/D11421







More information about the llvm-commits mailing list