aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r--lib/Transforms/Utils/Local.cpp6
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp10
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index 130b876ee9..a4ddfa5de3 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -169,11 +169,11 @@ bool llvm::ConstantFoldTerminator(BasicBlock *BB, bool DeleteDeadConditions) {
// Otherwise, we can fold this switch into a conditional branch
// instruction if it has only one non-default destination.
SwitchInst::CaseIt FirstCase = SI->case_begin();
- ConstantRangesSet CRS = FirstCase.getCaseValueEx();
- if (CRS.getNumItems() == 1 && CRS.isSingleNumber(0)) {
+ IntegersSubset CaseRanges = FirstCase.getCaseValueEx();
+ if (CaseRanges.getNumItems() == 1 && CaseRanges.isSingleNumber(0)) {
// FIXME: Currently work with ConstantInt based numbers.
Value *Cond = Builder.CreateICmpEQ(SI->getCondition(),
- CRS.getItem(0).Low.toConstantInt(),
+ CaseRanges.getItem(0).Low.toConstantInt(),
"cond");
// Insert the new branch.
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp
index 23620373a0..a4cf773292 100644
--- a/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/lib/Transforms/Utils/LowerSwitch.cpp
@@ -223,22 +223,22 @@ BasicBlock* LowerSwitch::newLeafBlock(CaseRange& Leaf, Value* Val,
// Clusterify - Transform simple list of Cases into list of CaseRange's
unsigned LowerSwitch::Clusterify(CaseVector& Cases, SwitchInst *SI) {
- CRSBuilder TheClusterifier;
+ IntegersSubsetToBB TheClusterifier;
// Start with "simple" cases
for (SwitchInst::CaseIt i = SI->case_begin(), e = SI->case_end();
i != e; ++i) {
BasicBlock *SuccBB = i.getCaseSuccessor();
- ConstantRangesSet CRS = i.getCaseValueEx();
- TheClusterifier.add(CRS, SuccBB);
+ IntegersSubset CaseRanges = i.getCaseValueEx();
+ TheClusterifier.add(CaseRanges, SuccBB);
}
TheClusterifier.optimize();
size_t numCmps = 0;
- for (CRSBuilder::RangeIterator i = TheClusterifier.begin(),
+ for (IntegersSubsetToBB::RangeIterator i = TheClusterifier.begin(),
e = TheClusterifier.end(); i != e; ++i, ++numCmps) {
- CRSBuilder::Cluster &C = *i;
+ IntegersSubsetToBB::Cluster &C = *i;
// FIXME: Currently work with ConstantInt based numbers.
// Changing it to APInt based is a pretty heavy for this commit.