mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
this wasn't intended to go in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66252 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc14d25dd9
commit
0070ce511e
@ -407,12 +407,6 @@ bool JumpThreading::ProcessBranchOnDuplicateCond(BasicBlock *PredBB,
|
||||
return true;
|
||||
}
|
||||
|
||||
struct APIntUnsignedOrdering {
|
||||
bool operator()(const APInt &LHS, const APInt &RHS) const {
|
||||
return LHS.ult(RHS);
|
||||
}
|
||||
};
|
||||
|
||||
/// ProcessSwitchOnDuplicateCond - We found a block and a predecessor of that
|
||||
/// block that switch on exactly the same condition. This means that we almost
|
||||
/// always know the direction of the edge in the DESTBB:
|
||||
@ -480,34 +474,6 @@ bool JumpThreading::ProcessSwitchOnDuplicateCond(BasicBlock *PredBB,
|
||||
return true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
// Figure out on which of the condition allow us to get to DESTBB. If DESTBB
|
||||
// is the default label, we compute the set of values COND is known not to be
|
||||
// otherwise we compute the set of options that COND could be.
|
||||
SmallVector<APInt, 16> KnownValues;
|
||||
bool DestBBIsDefault = PredSI->getSuccessor(0) == DestBB;
|
||||
|
||||
if (DestBBIsDefault) {
|
||||
// DestBB the default case. Collect the values where PredBB can't branch to
|
||||
// DestBB.
|
||||
for (unsigned i = 1/*skip default*/, e = PredSI->getNumCases(); i != e; ++i)
|
||||
if (PredSI->getSuccessor(i) != DestBB)
|
||||
KnownValues.push_back(PredSI->getCaseValue(i)->getValue());
|
||||
} else {
|
||||
// Not the default case. Collect the values where PredBB can branch to
|
||||
// DestBB.
|
||||
for (unsigned i = 1/*skip default*/, e = PredSI->getNumCases(); i != e; ++i)
|
||||
if (PredSI->getSuccessor(i) == DestBB)
|
||||
KnownValues.push_back(PredSI->getCaseValue(i)->getValue());
|
||||
}
|
||||
|
||||
std::sort(KnownValues.begin(), KnownValues.end(), APIntUnsignedOrdering());
|
||||
return false;
|
||||
cerr << "\nFOUND THREAD BLOCKS:\n";
|
||||
PredBB->dump();
|
||||
DestBB->dump();
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user