aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis/PHITransAddr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-12-09 00:56:14 +0000
committerChris Lattner <sabre@nondot.org>2009-12-09 00:56:14 +0000
commit6200e53f55536f812153ad910e6a69139592301b (patch)
tree50f8c7532a18638533ba0892fd176a26e0757e52 /include/llvm/Analysis/PHITransAddr.h
parentc0d91b75f0fc78cd19603ca6cd756aa392d7b293 (diff)
downloadexternal_llvm-6200e53f55536f812153ad910e6a69139592301b.tar.gz
external_llvm-6200e53f55536f812153ad910e6a69139592301b.tar.bz2
external_llvm-6200e53f55536f812153ad910e6a69139592301b.zip
fix many input tracking bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/PHITransAddr.h')
-rw-r--r--include/llvm/Analysis/PHITransAddr.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/llvm/Analysis/PHITransAddr.h b/include/llvm/Analysis/PHITransAddr.h
index c88e4013aa..b612316057 100644
--- a/include/llvm/Analysis/PHITransAddr.h
+++ b/include/llvm/Analysis/PHITransAddr.h
@@ -106,10 +106,13 @@ private:
BasicBlock *PredBB, const DominatorTree &DT,
SmallVectorImpl<Instruction*> &NewInsts);
- /// ReplaceInstWithValue - Remove any instruction inputs in the InstInputs
- /// array that are due to the specified instruction that is about to be
- /// removed from the address, and add any corresponding to V. This returns V.
- Value *ReplaceInstWithValue(Instruction *I, Value *V);
+ /// AddAsInput - If the specified value is an instruction, add it as an input.
+ Value *AddAsInput(Value *V) {
+ // If V is an instruction, it is now an input.
+ if (Instruction *VI = dyn_cast<Instruction>(V))
+ InstInputs.push_back(VI);
+ return V;
+ }
};