diff options
| author | Dan Gohman <dan433584@gmail.com> | 2013-02-12 22:26:41 +0000 |
|---|---|---|
| committer | Dan Gohman <dan433584@gmail.com> | 2013-02-12 22:26:41 +0000 |
| commit | a6307574d6d31c16db273734e6bb6b516eeeea81 (patch) | |
| tree | 8aa0da12e68d873fa73c9b61268cd6ebd0d0d106 /llvm/lib/Transforms | |
| parent | 60261eadbd03fd4620fd9fe97ee3796890fe15ab (diff) | |
| download | bcm5719-llvm-a6307574d6d31c16db273734e6bb6b516eeeea81.tar.gz bcm5719-llvm-a6307574d6d31c16db273734e6bb6b516eeeea81.zip | |
Actually delete this code, since it's really not clear what it's
trying to do.
llvm-svn: 175014
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 26b113492e0..c04b447f1cf 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -1526,10 +1526,8 @@ bool GVN::processNonLocalLoad(LoadInst *LI) { BasicBlock *LoadBB = LI->getParent(); BasicBlock *TmpBB = LoadBB; - bool isSinglePred = false; bool allSingleSucc = true; while (TmpBB->getSinglePredecessor()) { - isSinglePred = true; TmpBB = TmpBB->getSinglePredecessor(); if (TmpBB == LoadBB) // Infinite (unreachable) loop. return false; @@ -1548,28 +1546,6 @@ bool GVN::processNonLocalLoad(LoadInst *LI) { assert(TmpBB); LoadBB = TmpBB; - // FIXME: It is extremely unclear what this loop is doing, other than - // artificially restricting loadpre. - if (isSinglePred) { - bool isHot = false; - for (unsigned i = 0, e = ValuesPerBlock.size(); i != e; ++i) { - const AvailableValueInBlock &AV = ValuesPerBlock[i]; - if (AV.isSimpleValue()) - // "Hot" Instruction is in some loop (because it dominates its dep. - // instruction). - if (Instruction *I = dyn_cast<Instruction>(AV.getSimpleValue())) - if (DT->dominates(LI, I)) { - isHot = true; - break; - } - } - - // We are interested only in "hot" instructions. We don't want to do any - // mis-optimizations here. - if (!isHot) - return false; - } - // Check to see how many predecessors have the loaded value fully // available. DenseMap<BasicBlock*, Value*> PredLoads; |

