diff options
author | Victor Hernandez <vhernandez@apple.com> | 2009-10-23 21:09:37 +0000 |
---|---|---|
committer | Victor Hernandez <vhernandez@apple.com> | 2009-10-23 21:09:37 +0000 |
commit | 7b929dad59785f62a66f7c58615082f98441e95e (patch) | |
tree | fe3eb2cd3b56e7c3e89454d73e56986f3ce12ba2 /lib/Transforms/Scalar/GVN.cpp | |
parent | 4ab74cdc124af6b4f57c2d2d09548e01d64a1f34 (diff) | |
download | external_llvm-7b929dad59785f62a66f7c58615082f98441e95e.zip external_llvm-7b929dad59785f62a66f7c58615082f98441e95e.tar.gz external_llvm-7b929dad59785f62a66f7c58615082f98441e95e.tar.bz2 |
Remove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84969 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/GVN.cpp')
-rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index 8859324..00911b5 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1243,7 +1243,7 @@ bool GVN::processNonLocalLoad(LoadInst *LI, Instruction *DepInst = DepInfo.getInst(); // Loading the allocation -> undef. - if (isa<AllocationInst>(DepInst) || isMalloc(DepInst)) { + if (isa<AllocaInst>(DepInst) || isMalloc(DepInst)) { ValuesPerBlock.push_back(AvailableValueInBlock::get(DepBB, UndefValue::get(LI->getType()))); continue; @@ -1585,7 +1585,7 @@ bool GVN::processLoad(LoadInst *L, SmallVectorImpl<Instruction*> &toErase) { // If this load really doesn't depend on anything, then we must be loading an // undef value. This can happen when loading for a fresh allocation with no // intervening stores, for example. - if (isa<AllocationInst>(DepInst) || isMalloc(DepInst)) { + if (isa<AllocaInst>(DepInst) || isMalloc(DepInst)) { L->replaceAllUsesWith(UndefValue::get(L->getType())); toErase.push_back(L); NumGVNLoad++; @@ -1653,7 +1653,7 @@ bool GVN::processInstruction(Instruction *I, // Allocations are always uniquely numbered, so we can save time and memory // by fast failing them. - } else if (isa<AllocationInst>(I) || isa<TerminatorInst>(I)) { + } else if (isa<AllocaInst>(I) || isa<TerminatorInst>(I)) { localAvail[I->getParent()]->table.insert(std::make_pair(Num, I)); return false; } @@ -1803,7 +1803,7 @@ bool GVN::performPRE(Function& F) { BE = CurrentBlock->end(); BI != BE; ) { Instruction *CurInst = BI++; - if (isa<AllocationInst>(CurInst) || + if (isa<AllocaInst>(CurInst) || isa<TerminatorInst>(CurInst) || isa<PHINode>(CurInst) || CurInst->getType()->isVoidTy() || CurInst->mayReadFromMemory() || CurInst->mayHaveSideEffects() || |