[PATCH] D47088: Fix aliasing of launder.invariant.group

Piotr Padlewski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 15:27:59 PDT 2018


Prazek marked an inline comment as done.
Prazek added inline comments.


================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:135
 static bool isEscapeSource(const Value *V) {
-  if (auto CS = ImmutableCallSite(V)) {
-    // launder_invariant_group captures its argument only by returning it,
-    // so it might not be considered an escape by isNonEscapingLocalObject.
-    // Note that adding similar special cases for intrinsics in CaptureTracking
-    // requires handling them here too.
-    if (CS.getIntrinsicID() == Intrinsic::launder_invariant_group)
-      return false;
-
+  if (ImmutableCallSite(V))
     return true;
----------------
kuhar wrote:
> Why was the previous change reverted here?
Because it is not needed now, check comment I left on line 1625


================
Comment at: llvm/lib/Analysis/BasicAliasAnalysis.cpp:1625
 
   if (O1 != O2) {
     // If V1/V2 point to two different objects, we know that we have no alias.
----------------
We never go to this branch, because O1 and O2 are the same by changing GetUnderlyingObject


Repository:
  rL LLVM

https://reviews.llvm.org/D47088





More information about the llvm-commits mailing list