mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user