diff options
| author | Duncan Sands <baldrick@free.fr> | 2010-02-16 11:11:14 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2010-02-16 11:11:14 +0000 |
| commit | 19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f (patch) | |
| tree | d692f99bcaf8ceb28f12c941b517898ee7faedd3 /llvm/lib/Transforms/Scalar/LICM.cpp | |
| parent | d7d8afabd0498537b27b667151770b6b56691966 (diff) | |
| download | bcm5719-llvm-19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f.tar.gz bcm5719-llvm-19d0b47b1f58f913f9d39f0e2b0eb470f04ba82f.zip | |
There are two ways of checking for a given type, for example isa<PointerType>(T)
and T->isPointerTy(). Convert most instances of the first form to the second form.
Requested by Chris.
llvm-svn: 96344
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LICM.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 81f9ae61aa2..d7ace342fcb 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -678,7 +678,7 @@ void LICM::PromoteValuesInLoop() { // If we are promoting a pointer value, update alias information for the // inserted load. Value *LoadValue = 0; - if (isa<PointerType>(cast<PointerType>(Ptr->getType())->getElementType())) { + if (cast<PointerType>(Ptr->getType())->getElementType()->isPointerTy()) { // Locate a load or store through the pointer, and assign the same value // to LI as we are loading or storing. Since we know that the value is // stored in this loop, this will always succeed. @@ -751,7 +751,7 @@ void LICM::PromoteValuesInLoop() { LoadInst *LI = new LoadInst(PromotedValues[i].first, "", InsertPos); // If this is a pointer type, update alias info appropriately. - if (isa<PointerType>(LI->getType())) + if (LI->getType()->isPointerTy()) CurAST->copyValue(PointerValueNumbers[PVN++], LI); // Store into the memory we promoted. |

