summaryrefslogtreecommitdiff
path: root/lib/VMCore/Instructions.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2012-06-22 10:35:06 +0000
committerDuncan Sands <baldrick@free.fr>2012-06-22 10:35:06 +0000
commit37eeb058a30200101836d82098542d3d2fc4f3d5 (patch)
treed4fc16ec73599d4d8860172ba7adec80357e1d3c /lib/VMCore/Instructions.cpp
parent7351256208c9ff2cb7b5bdcf4427229abe2a50a8 (diff)
downloadllvm-37eeb058a30200101836d82098542d3d2fc4f3d5.tar.gz
llvm-37eeb058a30200101836d82098542d3d2fc4f3d5.tar.bz2
llvm-37eeb058a30200101836d82098542d3d2fc4f3d5.tar.xz
Revert commit 158979 (dyatkovskiy) since it is causing several buildbots to
fail. Original commit message: Performance optimizations: - SwitchInst: case values stored separately from Operands List. It allows to make faster access to individual case value numbers or ranges. - Optimized IntItem, added APInt value caching. - Optimized IntegersSubsetGeneric: added optimizations for cases when subset is single number or when subset consists from single numbers only. On my machine these optimizations gave about 4-6% of compile-time improvement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Instructions.cpp')
-rw-r--r--lib/VMCore/Instructions.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 30fa9fed10..26cc6322da 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -3158,7 +3158,6 @@ SwitchInst::SwitchInst(const SwitchInst &SI)
OL[i] = InOL[i];
OL[i+1] = InOL[i+1];
}
- TheSubsets = SI.TheSubsets;
SubclassOptionalData = SI.SubclassOptionalData;
}
@@ -3187,11 +3186,8 @@ void SwitchInst::addCase(IntegersSubset& OnVal, BasicBlock *Dest) {
// Initialize some new operands.
assert(OpNo+1 < ReservedSpace && "Growing didn't work!");
NumOperands = OpNo+2;
-
- SubsetsIt TheSubsetsIt = TheSubsets.insert(TheSubsets.end(), OnVal);
-
- CaseIt Case(this, NewCaseIdx, TheSubsetsIt);
- Case.updateCaseValueOperand(OnVal);
+ CaseIt Case(this, NewCaseIdx);
+ Case.setValueEx(OnVal);
Case.setSuccessor(Dest);
}
@@ -3214,11 +3210,6 @@ void SwitchInst::removeCase(CaseIt i) {
// Nuke the last value.
OL[NumOps-2].set(0);
OL[NumOps-2+1].set(0);
-
- // Do the same with TheCases collection:
- *i.SubsetIt = TheSubsets.back();
- TheSubsets.pop_back();
-
NumOperands = NumOps-2;
}