diff options
| author | Larisse Voufo <lvoufo@google.com> | 2015-09-15 19:14:05 +0000 |
|---|---|---|
| committer | Larisse Voufo <lvoufo@google.com> | 2015-09-15 19:14:05 +0000 |
| commit | 6b867c725400d4b3bd3411c41359fdfa045e1c5d (patch) | |
| tree | 6984c9eec9b2522c6e3504cdeb273c8cb7ea420b /llvm/lib/Transforms/Scalar/JumpThreading.cpp | |
| parent | 4eea8c6b824402f07a630f596fd3b0b6a4ec5c4f (diff) | |
| download | bcm5719-llvm-6b867c725400d4b3bd3411c41359fdfa045e1c5d.tar.gz bcm5719-llvm-6b867c725400d4b3bd3411c41359fdfa045e1c5d.zip | |
Revert "Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan." for preliminary community discussion (See. D12886)
llvm-svn: 247716
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
| -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 d3b9a34ba39..f71376827a4 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -769,7 +769,7 @@ bool JumpThreading::ProcessBlock(BasicBlock *BB) { // If we're branching on a conditional, LVI might be able to determine // it's value at the branch instruction. We only handle comparisons // against a constant at this time. - // TODO: This should be extended to handle switches as well. + // TODO: This should be extended to handle switches as well. BranchInst *CondBr = dyn_cast<BranchInst>(BB->getTerminator()); Constant *CondConst = dyn_cast<Constant>(CondCmp->getOperand(1)); if (CondBr && CondConst && CondBr->isConditional()) { @@ -877,7 +877,7 @@ bool JumpThreading::SimplifyPartiallyRedundantLoad(LoadInst *LI) { BasicBlock::iterator BBIt = LI; if (Value *AvailableVal = - FindAvailableLoadedValue(LoadedPtr, LoadBB, BBIt)) { + FindAvailableLoadedValue(LoadedPtr, LoadBB, BBIt, 6)) { // If the value if the load is locally available within the block, just use // it. This frequently occurs for reg2mem'd allocas. //cerr << "LOAD ELIMINATED:\n" << *BBIt << *LI << "\n"; @@ -922,8 +922,7 @@ bool JumpThreading::SimplifyPartiallyRedundantLoad(LoadInst *LI) { // Scan the predecessor to see if the value is available in the pred. BBIt = PredBB->end(); AAMDNodes ThisAATags; - Value *PredAvailable = FindAvailableLoadedValue(LoadedPtr, PredBB, BBIt, - DEF_MAX_INSTS_TO_SCAN, + Value *PredAvailable = FindAvailableLoadedValue(LoadedPtr, PredBB, BBIt, 6, nullptr, &ThisAATags); if (!PredAvailable) { OneUnavailablePred = PredBB; |

