[llvm] [FunctionAttrs] Add the "initializes" attribute inference (PR #97373)

Arthur Eubanks via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 15:38:22 PDT 2024


================
@@ -1844,13 +2172,13 @@ deriveAttrsInPostOrder(ArrayRef<Function *> Functions, AARGetterT &&AARGetter,
 
   SmallSet<Function *, 8> Changed;
   if (ArgAttrsOnly) {
-    addArgumentAttrs(Nodes.SCCNodes, Changed);
+    addArgumentAttrs(Nodes.SCCNodes, Changed, /*SkipInitializes=*/true);
----------------
aeubanks wrote:

I would simplify the comment a bit, this is too much detail. The important thing is that `ArgAttrsOnly` means to only infer attributes that may aid optimizations on the current function. `initializes` does not fall into that category.

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


More information about the llvm-commits mailing list