[PATCH] D14228: [FunctionAttrs] Identify norecurse functions
Mehdi AMINI via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 6 07:47:27 PST 2015
joker.eph added inline comments.
================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:71
@@ +70,3 @@
+ }
+ bool doFinalization(CallGraph &CG) override;
+
----------------
This is sad: it will run at the end of the SCC PassManager, it means you need a barrier after this pass in the pipeline before running another pass. (I don't have a better solution to suggest though).
================
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:1778
@@ +1777,3 @@
+ // If F is internal, has only one use and that use of F is a norecurse
+ // function, then F is also norecurse.
+ if (F->hasOneUse() && F->hasInternalLinkage())
----------------
Why one use? If F has multiple callers but they are all "norecurse", shouldn't it be enough?
Repository:
rL LLVM
http://reviews.llvm.org/D14228
More information about the llvm-commits
mailing list