[llvm] [FuncAttrs] Relax norecurse attribute inference (PR #139943)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 12 08:09:11 PDT 2025


================
@@ -2060,7 +2060,9 @@ static void inferAttrsFromFunctionBodies(const SCCNodeSet &SCCNodes,
 }
 
 static void addNoRecurseAttrs(const SCCNodeSet &SCCNodes,
-                              SmallSet<Function *, 8> &Changed) {
+                              SmallSet<Function *, 8> &Changed,
+                              bool AnyFunctionsAddressIsTaken,
----------------
david-arm wrote:

If you invert the flag to be NoFunctionAddressIsTaken then I think you can remove the second `IsLTOPostLink` flag, because then `NoFunctionAddressIsTaken` is false if not LTO or if LTO but an address is taken.

https://github.com/llvm/llvm-project/pull/139943


More information about the llvm-commits mailing list