[PATCH] Handling store to invariant address in LAA

Adam Nemet anemet at apple.com
Thu Apr 2 22:43:10 PDT 2015


REPOSITORY
  rL LLVM

================
Comment at: lib/Analysis/LoopAccessAnalysis.cpp:1310-1312
@@ -1316,1 +1309,5 @@
 
+  OS.indent(Depth) << "Store to invariant address has " 
+                   << (StoreToLoopInvariantAddress ? "" : "not ")
+                   << "found in loop.\n";
+
----------------
"was (not) found" or "has (not) been found"


================
Comment at: test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll:3
@@ +2,3 @@
+
+; Its to confirm LAA will find store to invariant address.
+; Inner loop has a store to invariant address.
----------------
It's

================
Comment at: test/Analysis/LoopAccessAnalysis/store-to-invariant-check1.ll:34
@@ +33,3 @@
+  %arrayidx = getelementptr inbounds i32, i32* %var2, i64 %indvars.iv
+  %1 = load i32, i32* %arrayidx, align 4, !tbaa !1
+  %2 = load i32, i32* %arrayidx5, align 4, !tbaa !1
----------------
I may be wrong but I think by default we use no alias analysis (-no-aa), so the tbaa annotations are unnecessary in these two test cases (including the metadata at the end of the files).  I would remove them.

http://reviews.llvm.org/D8653

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list