summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LowerSwitch.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
commitb65acc61a5f3ff22d6348e17d7fe4df8d3b99882 (patch)
treea5a37531436c6b9ebfd5961f9f292808f24d14f6 /llvm/lib/Transforms/Utils/LowerSwitch.cpp
parent939236c2eb623b8437b8d746840acc6fff18b334 (diff)
downloadbcm5719-llvm-b65acc61a5f3ff22d6348e17d7fe4df8d3b99882.tar.gz
bcm5719-llvm-b65acc61a5f3ff22d6348e17d7fe4df8d3b99882.zip
Revert "IntRange:" as it appears to be breaking self hosting.
This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c. llvm-svn: 159618
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LowerSwitch.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
index d2bd9d02846..1547439b5c6 100644
--- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp
@@ -238,14 +238,13 @@ unsigned LowerSwitch::Clusterify(CaseVector& Cases, SwitchInst *SI) {
size_t numCmps = 0;
for (IntegersSubsetToBB::RangeIterator i = TheClusterifier.begin(),
e = TheClusterifier.end(); i != e; ++i, ++numCmps) {
- const IntegersSubsetToBB::RangeTy &R = i->first;
- BasicBlock *S = i->second;
+ IntegersSubsetToBB::Cluster &C = *i;
// FIXME: Currently work with ConstantInt based numbers.
// Changing it to APInt based is a pretty heavy for this commit.
- Cases.push_back(CaseRange(R.getLow().toConstantInt(),
- R.getHigh().toConstantInt(), S));
- if (R.isSingleNumber())
+ Cases.push_back(CaseRange(C.first.getLow().toConstantInt(),
+ C.first.getHigh().toConstantInt(), C.second));
+ if (C.first.isSingleNumber())
// A range counts double, since it requires two compares.
++numCmps;
}
OpenPOWER on IntegriCloud