[PATCH] D17013: Add convergent-removing bits to FunctionAttrs pass.

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 13:21:57 PST 2016


joker.eph accepted this revision.
joker.eph added a reviewer: joker.eph.
joker.eph added a comment.

LGTM.


================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:973
@@ +972,3 @@
+      return false;
+  }
+
----------------
Suggestion: outline the loop body in a helper function `canRemoveConvergent(CallGraphNode *CGN)`

The loop becomes then: `if(!llvm::all_of(SCC, canRemoveConvergent)) return false;`




http://reviews.llvm.org/D17013





More information about the llvm-commits mailing list