summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CodeExtractor.cpp
diff options
context:
space:
mode:
authorStepan Dyatkovskiy <stpworld@narod.ru>2012-06-22 14:53:30 +0000
committerStepan Dyatkovskiy <stpworld@narod.ru>2012-06-22 14:53:30 +0000
commit43c3a4a7e76920c5646e473b72620acc7eb4ca5a (patch)
tree3ca0fdb5a975b0ac166e14958abe62877d4a4f1c /lib/Transforms/Utils/CodeExtractor.cpp
parent84f64f317f5211dd8b8446e9933778350b254163 (diff)
downloadllvm-43c3a4a7e76920c5646e473b72620acc7eb4ca5a.tar.gz
llvm-43c3a4a7e76920c5646e473b72620acc7eb4ca5a.tar.bz2
llvm-43c3a4a7e76920c5646e473b72620acc7eb4ca5a.tar.xz
Fixed r158979.
Original 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CodeExtractor.cpp')
-rw-r--r--lib/Transforms/Utils/CodeExtractor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/CodeExtractor.cpp b/lib/Transforms/Utils/CodeExtractor.cpp
index f10dbbeef2..c545cd68c9 100644
--- a/lib/Transforms/Utils/CodeExtractor.cpp
+++ b/lib/Transforms/Utils/CodeExtractor.cpp
@@ -664,7 +664,8 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
TheSwitch->setCondition(call);
TheSwitch->setDefaultDest(TheSwitch->getSuccessor(NumExitBlocks));
// Remove redundant case
- TheSwitch->removeCase(SwitchInst::CaseIt(TheSwitch, NumExitBlocks-1));
+ SwitchInst::CaseIt ToBeRemoved(TheSwitch, NumExitBlocks-1);
+ TheSwitch->removeCase(ToBeRemoved);
break;
}
}