[llvm-commits] [llvm] r66252 - /llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
Chris Lattner
sabre at nondot.org
Thu Mar 5 21:42:30 PST 2009
Author: lattner
Date: Thu Mar 5 23:42:30 2009
New Revision: 66252
URL: http://llvm.org/viewvc/llvm-project?rev=66252&view=rev
Log:
this wasn't intended to go in.
Modified:
llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp?rev=66252&r1=66251&r2=66252&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/JumpThreading.cpp Thu Mar 5 23:42:30 2009
@@ -407,12 +407,6 @@
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 @@
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;
}
More information about the llvm-commits
mailing list