diff options
author | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:29:10 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:29:10 +0000 |
commit | 38392bbeb81233d0b342ad33166fc82ad922bc34 (patch) | |
tree | 99e205af22f02230682a5513f79ff41fd1c171d3 /lib/Transforms/Scalar/JumpThreading.cpp | |
parent | f035ce58bcf66c45d7a956668ae950f1eeeb8b20 (diff) | |
download | llvm-38392bbeb81233d0b342ad33166fc82ad922bc34.tar.gz llvm-38392bbeb81233d0b342ad33166fc82ad922bc34.tar.bz2 llvm-38392bbeb81233d0b342ad33166fc82ad922bc34.tar.xz |
expose edge information and switch j-t to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r-- | lib/Transforms/Scalar/JumpThreading.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/JumpThreading.cpp b/lib/Transforms/Scalar/JumpThreading.cpp index e93e9cb4d3..a380857235 100644 --- a/lib/Transforms/Scalar/JumpThreading.cpp +++ b/lib/Transforms/Scalar/JumpThreading.cpp @@ -278,7 +278,7 @@ ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB,PredValueInfo &Result){ for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) { // If the value is known by LazyValueInfo to be a constant in a // predecessor, use that information to try to thread this block. - Constant *PredCst = LVI->getConstant(V, *PI); + Constant *PredCst = LVI->getConstantOnEdge(V, *PI, BB); if (PredCst == 0 || (!isa<ConstantInt>(PredCst) && !isa<UndefValue>(PredCst))) continue; @@ -384,7 +384,7 @@ ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB,PredValueInfo &Result){ for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) { // If the value is known by LazyValueInfo to be a constant in a // predecessor, use that information to try to thread this block. - Constant *PredCst = LVI->getConstant(Cmp->getOperand(0), *PI); + Constant *PredCst = LVI->getConstantOnEdge(Cmp->getOperand(0), *PI, BB); if (PredCst == 0) continue; |