Hi Mehdi,<br><br>I think that might not be sufficient, but I'm prepared to be convince otherwise. <br><br>Consider F with call sites in two functions : A and B. Even if A and B are norecurse, there is no guarantee we can't do something like: A -> F -> B -> F, right? Or actually that should show up in the SCC, so that can't happen ...<br><br>... So I've just convinced myself that you're right :) I'll loosen the code slightly. <br><br>James<br><div class="gmail_quote"><div dir="ltr">On Fri, 6 Nov 2015 at 17:39, Manman Ren via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">manmanren added inline comments.<br>
<br>
================<br>
Comment at: lib/Transforms/IPO/FunctionAttrs.cpp:1778<br>
@@ +1777,3 @@<br>
+ // If F is internal, has only one use and that use of F is a norecurse<br>
+ // function, then F is also norecurse.<br>
+ if (F->hasOneUse() && F->hasInternalLinkage())<br>
----------------<br>
joker.eph wrote:<br>
> Why one use? If F has multiple callers but they are all "norecurse", shouldn't it be enough?<br>
During bottom-up traversal, have the uses of F been visited and possibly marked as norecurse?<br>
<br>
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D14228" rel="noreferrer" target="_blank">http://reviews.llvm.org/D14228</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>