[llvm-commits] [llvm] r47250 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp

Chris Lattner sabre at nondot.org
Sun Feb 17 18:11:29 PST 2008


Author: lattner
Date: Sun Feb 17 20:11:28 2008
New Revision: 47250

URL: http://llvm.org/viewvc/llvm-project?rev=47250&view=rev
Log:
bitcasts of pointers are always pointers.
If we see a memcpy of a pointer, make sure to check later
uses of the pointer as well.

Modified:
    llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp

Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=47250&r1=47249&r2=47250&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Sun Feb 17 20:11:28 2008
@@ -219,8 +219,6 @@
         return true;
       break; // next use.
     case Instruction::BitCast:
-      if (!isa<PointerType>(I->getType()))
-        return true;
       if (AddressMightEscape(I))
         return true;
       break; // next use
@@ -231,10 +229,9 @@
     case Instruction::Call:
       // If the call is to a few known safe intrinsics, we know that it does
       // not escape
-      if (isa<MemIntrinsic>(I))
-        return false;
-      else
+      if (!isa<MemIntrinsic>(I))
         return true;
+      break;  // next use
     default:
       return true;
     }





More information about the llvm-commits mailing list