[PATCH] D14228: [FunctionAttrs] Identify norecurse functions

Manman Ren via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 09:15:53 PST 2015


manmanren added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:1778
@@ +1777,3 @@
+  // If F is internal and all uses are in norecurse functions, then F is also
+  // norecurse.
+  if (F->hasInternalLinkage()) {
----------------
There may be an ordering problem on setting NoRecurse. Have users of F been traversed? A testing case that exercises this would be nice.

================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:1811
@@ +1810,3 @@
+
+static bool addNoRecurseAttrsTopDownOnly(Function *F) {
+  // If F is internal and all uses are in norecurse functions, then F is also
----------------
A testing case that covers this would be nice. I didn't really look through your testing cases, so you may already have one there :]


Repository:
  rL LLVM

http://reviews.llvm.org/D14228





More information about the llvm-commits mailing list