mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-17 23:44:43 +00:00
Actually delete this code, since it's really not clear what it's
trying to do. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
469b144f1c
commit
8a8de9889d
@ -1526,10 +1526,8 @@ bool GVN::processNonLocalLoad(LoadInst *LI) {
|
|||||||
BasicBlock *LoadBB = LI->getParent();
|
BasicBlock *LoadBB = LI->getParent();
|
||||||
BasicBlock *TmpBB = LoadBB;
|
BasicBlock *TmpBB = LoadBB;
|
||||||
|
|
||||||
bool isSinglePred = false;
|
|
||||||
bool allSingleSucc = true;
|
bool allSingleSucc = true;
|
||||||
while (TmpBB->getSinglePredecessor()) {
|
while (TmpBB->getSinglePredecessor()) {
|
||||||
isSinglePred = true;
|
|
||||||
TmpBB = TmpBB->getSinglePredecessor();
|
TmpBB = TmpBB->getSinglePredecessor();
|
||||||
if (TmpBB == LoadBB) // Infinite (unreachable) loop.
|
if (TmpBB == LoadBB) // Infinite (unreachable) loop.
|
||||||
return false;
|
return false;
|
||||||
@ -1548,28 +1546,6 @@ bool GVN::processNonLocalLoad(LoadInst *LI) {
|
|||||||
assert(TmpBB);
|
assert(TmpBB);
|
||||||
LoadBB = 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
|
// Check to see how many predecessors have the loaded value fully
|
||||||
// available.
|
// available.
|
||||||
DenseMap<BasicBlock*, Value*> PredLoads;
|
DenseMap<BasicBlock*, Value*> PredLoads;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user