[PATCH] D67751: [Attributor] Implement "norecurse" function attribute deduction

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 13:48:44 PDT 2019


jdoerfert added a comment.

Thx, I have a few minor comments, mostly wrt. to the test.



================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:547
 private:
-  FunctionAnalysisManager *FAM = nullptr;
+  ModuleAnalysisManager *AM = nullptr;
 };
----------------
nit: Make it `MAM`.


================
Comment at: llvm/include/llvm/Transforms/IPO/Attributor.h:568
+    if (!CG)
+      return;
+    DenseMap<const Function *, unsigned> SccSize;
----------------
nit: can you add a newline here :)


================
Comment at: llvm/test/Transforms/FunctionAttrs/norecurse.ll:129
+  ret i32 1
+}
----------------
do we have a function pointer test?
do we have a test with recursion through a dead call site?


================
Comment at: llvm/test/Transforms/FunctionAttrs/willreturn.ll:529
   br label %L2
 L2:
   br label %L1
----------------
Willreturn uses norecurse, could we have a test to show how this improved willreturn?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67751/new/

https://reviews.llvm.org/D67751





More information about the llvm-commits mailing list