diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-03-06 05:42:30 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-03-06 05:42:30 +0000 |
| commit | e6d1e8d0cc2a1126725f0981b38dc5abe3486873 (patch) | |
| tree | 02b7ae3c237e2eae4d989b88f4c24c68ef621ebb /llvm/lib/Transforms | |
| parent | 855d149ec5f62b9e79fe85cadfe11c77eb4dfe5a (diff) | |
| download | bcm5719-llvm-e6d1e8d0cc2a1126725f0981b38dc5abe3486873.tar.gz bcm5719-llvm-e6d1e8d0cc2a1126725f0981b38dc5abe3486873.zip | |
this wasn't intended to go in.
llvm-svn: 66252
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/JumpThreading.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp index 1f3e6b11c83..f96fc208ae1 100644 --- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp +++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp @@ -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; } |

