diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-08-04 23:24:19 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-08-04 23:24:19 +0000 |
commit | a83ba0f5c934e2cdbb5724cab365ecc0b5aae6c6 (patch) | |
tree | c2f7359039f56fc721dea9838ec9662af10f8ba0 /lib/Transforms/Utils/PromoteMemoryToRegister.cpp | |
parent | f065f05397d0a46482f3dd1ebad31cb2d27bd236 (diff) |
Fix a fixme in CondPropagate.cpp by moving a PhiNode optimization into
BasicBlock's removePredecessor routine. This requires shuffling around
the definition and implementation of hasContantValue from Utils.h,cpp into
Instructions.h,cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/PromoteMemoryToRegister.cpp')
-rw-r--r-- | lib/Transforms/Utils/PromoteMemoryToRegister.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp index 1edc119376..bb7f868093 100644 --- a/lib/Transforms/Utils/PromoteMemoryToRegister.cpp +++ b/lib/Transforms/Utils/PromoteMemoryToRegister.cpp @@ -24,7 +24,6 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Analysis/AliasSetTracker.h" #include "llvm/ADT/StringExtras.h" -#include "llvm/Transforms/Utils/Local.h" #include "llvm/Support/CFG.h" #include "llvm/Support/StableBasicBlockNumbering.h" #include <algorithm> @@ -348,7 +347,7 @@ void PromoteMem2Reg::run() { PHINode *SomePHI = 0; for (unsigned i = 0, e = PNs.size(); i != e; ++i) if (PNs[i]) { - if (Value *V = hasConstantValue(PNs[i])) { + if (Value *V = PNs[i]->hasConstantValue()) { if (!isa<Instruction>(V) || dominates(cast<Instruction>(V), PNs[i])) { if (AST && isa<PointerType>(PNs[i]->getType())) AST->deleteValue(PNs[i]); |