[PATCH] D18939: [AliasSetTracker] Correctly handle changing size of an entry

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 11 15:04:17 PDT 2016


hfinkel added inline comments.

================
Comment at: lib/Analysis/AliasSetTracker.cpp:278
@@ +277,3 @@
+    // If the size changed, we may need to merge several alias sets.
+    // Use findAliasSetForPointer for its merging side effect.
+    // Note that we can *not* return the result of findAliasSetForPointer
----------------
Saying "Use findAliasSetForPointer for its merging side effect." implies that findAliasSetForPointer does other things too. If it did, it would be reasonable to split the behavior. However, merging together all alias sets aliasing the provided pointer is exactly what findAliasSetForPointer does. I think this is worth saying. Instead of:

  // Use findAliasSetForPointer for its merging side effect. 

how about:

  // Merging together all alias sets which alias a particular pointer is exactly what findAliasSetForPointer does.

================
Comment at: lib/Analysis/AliasSetTracker.cpp:282
@@ +281,3 @@
+    // is NoAlias, findAliasSetForPointer(undef, ...) will not find the
+    // the right set for undef, even if it exists.
+    if (Entry.updateSizeAndAAInfo(Size, AAInfo))
----------------
What is the right alias set for undef?


http://reviews.llvm.org/D18939





More information about the llvm-commits mailing list