[PATCH] D17317: [attrs] Handle convergent CallSites.

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 17:08:06 PST 2016


chandlerc added a comment.

See my comment below, but it seems like the removal of the call instruction attribute makes more sense in instcombine or something like it when we see a direct call to a non-convergent function (we don't need any call graph analysis for that). Then this code would just need to handle removing the attribute from function definitions when we can do a conservative analysis of an entire SCC and determine that no convergent operation is actually reached.

These should still iterate nicely in a bottom-up fashion.


================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:938-939
@@ -937,4 +937,4 @@
 
-/// Removes convergent attributes where we can prove that none of the SCC's
-/// callees are themselves convergent.  Returns true if successful at removing
-/// the attribute.
+/// Remove convergent attributes on calls where we can prove that the callee is
+/// not a convergent function, and remove convergent attributes on the SCC's
+/// functions where we can prove that none of the SCC's callees are themselves
----------------
The first claim doesn't seem true. This code bails when the SCC contains a call to a declaration, and we don't even call this routine if the SCC contains an external call.


http://reviews.llvm.org/D17317





More information about the llvm-commits mailing list