diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:37:43 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-11-12 01:37:43 +0000 |
| commit | 3f80d8519130ab0d9139f0023076bd18216d6c5f (patch) | |
| tree | 8d4a4cc9ba77f092ae8082dbef659d44e46788dd /llvm/lib/Transforms | |
| parent | f7316732b8d082444c9809cde31d0fc9f1300369 (diff) | |
| download | bcm5719-llvm-3f80d8519130ab0d9139f0023076bd18216d6c5f.tar.gz bcm5719-llvm-3f80d8519130ab0d9139f0023076bd18216d6c5f.zip | |
this argument can be an arbitrary value, it doesn't need to be an instruction.
llvm-svn: 86923
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index a380857235b..e7ca0f4b50f 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -95,7 +95,7 @@ namespace { bool ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB, PredValueInfo &Result); - bool ProcessThreadableEdges(Instruction *CondInst, BasicBlock *BB); + bool ProcessThreadableEdges(Value *Cond, BasicBlock *BB); bool ProcessBranchOnDuplicateCond(BasicBlock *PredBB, BasicBlock *DestBB); @@ -927,15 +927,14 @@ FindMostPopularDest(BasicBlock *BB, return MostPopularDest; } -bool JumpThreading::ProcessThreadableEdges(Instruction *CondInst, - BasicBlock *BB) { +bool JumpThreading::ProcessThreadableEdges(Value *Cond, BasicBlock *BB) { // If threading this would thread across a loop header, don't even try to // thread the edge. if (LoopHeaders.count(BB)) return false; SmallVector<std::pair<ConstantInt*, BasicBlock*>, 8> PredValues; - if (!ComputeValueKnownInPredecessors(CondInst, BB, PredValues)) + if (!ComputeValueKnownInPredecessors(Cond, BB, PredValues)) return false; assert(!PredValues.empty() && "ComputeValueKnownInPredecessors returned true with no values"); |

