Deduce the "no-recurse" function attribute through "backward-reasoning".
Thus, if no call site in the function may cause recursion, the function
does not recurse. Note that "backward-reasoning" is the only reasoning
the Attributor performs right now.
Impact on the statistics (-stats) for LLVM-TS + Spec2006, totaling
almost 80% more localized globals (probably due to the intrinsic
white list used).
CHANGED: attributor NumAttributesManifested 612 -> 14331 ( +2241.667%) CHANGED: attributor NumAttributesValidFixpoint 26069 -> 39788 ( +52.626%) ADDED: attributor NumFnNoRecurse n/a -> 13719 CHANGED: functionattrs NumNoRecurse 61932 -> 49305 ( -20.388%) CHANGED: globalopt NumLocalized 37 -> 66 ( +78.378%)
Note: Missing "no-recurse" deduction compared to functionattrs is completely, or at least in large parts, due to a bug in the existing code, see: https://llvm.org/PR41336
Possible improvements:
- Perform "forward-reasoning": If all call sites are in no-recurse functions then the function must be no-recurse.
- Eliminate dead call sites: Similar to the preliminary reasoning in the no-return abstract attribute we can ignore dead call sites.
LLVM hosts the mailing list archives on lists.llvm.org. I think the "official" link would be https://lists.llvm.org/pipermail/llvm-dev/2017-June/113714.html
(I think I understand the problem here is that the discussion continued over multiple months and llvm's official archives are generated split per month. If that's the reason behind linking to nabble, I think it's worth a bug report on bugs.llvm.org , and I won't comment again about whether it's a link to lists.llvm.org or nabble.com -- though I'm rather unhappy that nabble has misconfigured HTTPS.)