aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-07-02 23:22:21 +0000
committerEric Christopher <echristo@apple.com>2012-07-02 23:22:21 +0000
commitc723eb1aef817d47feec620933ee1ec6005cdd14 (patch)
tree01b6b0506dc61ab43904a7b71b5a499ba8376c1e /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
parent3aaefc12bbc365294582af63ce23dd76636e95b0 (diff)
Revert "IntRange:" as it appears to be breaking self hosting.
This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159618 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 2d074079cc..42b9099cdc 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -2450,23 +2450,22 @@ size_t SelectionDAGBuilder::Clusterify(CaseVector& Cases,
size_t numCmps = 0;
for (Clusterifier::RangeIterator i = TheClusterifier.begin(),
e = TheClusterifier.end(); i != e; ++i, ++numCmps) {
- const Clusterifier::RangeEx &R = i->first;
- MachineBasicBlock *MBB = i->second;
+ Clusterifier::Cluster &C = *i;
unsigned W = 0;
if (BPI) {
- W = BPI->getEdgeWeight(SI.getParent(), MBB->getBasicBlock());
+ W = BPI->getEdgeWeight(SI.getParent(), C.second->getBasicBlock());
if (!W)
W = 16;
- W *= R.Weight;
- BPI->setEdgeWeight(SI.getParent(), MBB->getBasicBlock(), W);
+ W *= C.first.Weight;
+ BPI->setEdgeWeight(SI.getParent(), C.second->getBasicBlock(), W);
}
// FIXME: Currently work with ConstantInt based numbers.
// Changing it to APInt based is a pretty heavy for this commit.
- Cases.push_back(Case(R.getLow().toConstantInt(),
- R.getHigh().toConstantInt(), MBB, W));
+ Cases.push_back(Case(C.first.getLow().toConstantInt(),
+ C.first.getHigh().toConstantInt(), C.second, W));
- if (R.getLow() != R.getHigh())
+ if (C.first.getLow() != C.first.getHigh())
// A range counts double, since it requires two compares.
++numCmps;
}