[PATCH] D20665: Claim NoAlias if two GEPs index different fields of the same struct

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 06:47:38 PDT 2016


mcrosier added a subscriber: mcrosier.

================
Comment at: lib/Analysis/BasicAliasAnalysis.cpp:841
@@ +840,3 @@
+  // If both GEP1 and GEP2 have the inbounds keyword but index different fields
+  // of the same struct, they do not alias
+  if (GEP1->isInBounds() && GEP2->isInBounds()) {
----------------
Please add a period.

================
Comment at: lib/Analysis/BasicAliasAnalysis.cpp:858
@@ +857,3 @@
+        IntermediateIndices.push_back(C1);
+        Opi1++;
+        Opi2++;
----------------
Pre-increment is preferred.


http://reviews.llvm.org/D20665





More information about the llvm-commits mailing list