summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-27 21:46:50 +0000
committerChris Lattner <sabre@nondot.org>2009-09-27 21:46:50 +0000
commit4425660b1f9e096534bed960ed2dd36c7f04053e (patch)
treebbc34b68e26350643516b35ba7a04f3e9a916f44 /llvm/lib/Transforms/Scalar
parentb2e88cd01c63069479623149a5fc1f514b344dda (diff)
downloadbcm5719-llvm-4425660b1f9e096534bed960ed2dd36c7f04053e.tar.gz
bcm5719-llvm-4425660b1f9e096534bed960ed2dd36c7f04053e.zip
simplify some code.
llvm-svn: 82936
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index f490a6d7f2c..86bbc602e39 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -1822,7 +1822,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) || isMalloc(I) || isa<TerminatorInst>(I)) {
+ } else if (isa<AllocationInst>(I) || isa<TerminatorInst>(I)) {
localAvail[I->getParent()]->table.insert(std::make_pair(Num, I));
return false;
}
@@ -1987,7 +1987,7 @@ bool GVN::performPRE(Function& F) {
BE = CurrentBlock->end(); BI != BE; ) {
Instruction *CurInst = BI++;
- if (isa<AllocationInst>(CurInst) || isMalloc(CurInst) ||
+ if (isa<AllocationInst>(CurInst) ||
isa<TerminatorInst>(CurInst) || isa<PHINode>(CurInst) ||
(CurInst->getType() == Type::getVoidTy(F.getContext())) ||
CurInst->mayReadFromMemory() || CurInst->mayHaveSideEffects() ||
OpenPOWER on IntegriCloud