[llvm-commits] [llvm] r82936 - /llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Chris Lattner
sabre at nondot.org
Sun Sep 27 14:46:50 PDT 2009
Author: lattner
Date: Sun Sep 27 16:46:50 2009
New Revision: 82936
URL: http://llvm.org/viewvc/llvm-project?rev=82936&view=rev
Log:
simplify some code.
Modified:
llvm/trunk/lib/Transforms/Scalar/GVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVN.cpp?rev=82936&r1=82935&r2=82936&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVN.cpp Sun Sep 27 16:46:50 2009
@@ -1822,7 +1822,7 @@
// 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 @@
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() ||
More information about the llvm-commits
mailing list