[PATCH] D22202: Let FuncAttrs infer the 'returned' argument attribute

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 10 13:13:58 PDT 2016


majnemer requested changes to this revision.
majnemer added a comment.
This revision now requires changes to proceed.

I'd update the langref, it currently says:

> This is an optimization hint to the code generator when generating the caller





================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:494-495
@@ +493,4 @@
+
+  // Check each function in turn, determining which pointer arguments are not
+  // captured.
+  for (Function *F : SCCNodes) {
----------------
Is this comment correct?

================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:508
@@ +507,3 @@
+    for (BasicBlock &BB : *F)
+      if (ReturnInst *Ret = dyn_cast<ReturnInst>(BB.getTerminator())) {
+        // Note that stripPointerCasts should look through functions with
----------------
`auto *Ret`


http://reviews.llvm.org/D22202





More information about the llvm-commits mailing list