summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-01-20 08:57:44 +0000
committerDaniel Jasper <djasper@google.com>2015-01-20 08:57:44 +0000
commitd106b734cfbfb490b93af9c5166d1b31b5e1581c (patch)
treea001720ea4982e74b024d36d12dc02643ff8be51 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
parent5175b9a7b9bcbe895b3ec484f5984551e19bf903 (diff)
downloadbcm5719-llvm-d106b734cfbfb490b93af9c5166d1b31b5e1581c.tar.gz
bcm5719-llvm-d106b734cfbfb490b93af9c5166d1b31b5e1581c.zip
Factor out a splitSwitchCase() function so that it can be reused.
This is in preparation for a fix to llvm.org/PR22262. One of the ideas here is to first find a good jump table range first and then split before and after it. Thereby, we don't need to use the split-based-on-density heuristic at all, which can make the "binary tree" deteriorate in various cases. Also some minor cleanups. No functional changes. llvm-svn: 226551
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index eba98b8086b..30cc125b38f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -687,6 +687,8 @@ private:
CaseRecVector& WorkList,
const Value* SV,
MachineBasicBlock *SwitchBB);
+ void splitSwitchCase(CaseRec &CR, CaseItr Pivot, CaseRecVector &WorkList,
+ const Value *SV, MachineBasicBlock *SwitchBB);
bool handleBitTestsSwitchCase(CaseRec& CR,
CaseRecVector& WorkList,
const Value* SV,
OpenPOWER on IntegriCloud