llvm-6502/test
Hans Wennborg ee16995e3d Switch lowering: add heuristic for filling leaf nodes in the weight-balanced binary search tree
Sparse switches with profile info are lowered as weight-balanced BSTs. For
example, if the node weights are {1,1,1,1,1,1000}, the right-most node would
end up in a tree by itself, bringing it closer to the top.

However, a leaf in this BST can contain up to 3 cases, and having a single
case in a leaf node as in the example means the tree might become
unnecessarily high.

This patch adds a heauristic to the pivot selection algorithm that moves more
cases into leaf nodes unless that would lower their rank. It still doesn't
yield the optimal tree in every case, but I believe it's conservatibely correct.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240224 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-20 17:14:07 +00:00
..
Analysis [X86][SSE][CostModel] Added full set of sitofp/uitofp costings for SSE2/AVX/AVX2/AVX512F. 2015-06-20 14:58:01 +00:00
Assembler Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Bindings
Bitcode Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
BugPoint
CodeGen Switch lowering: add heuristic for filling leaf nodes in the weight-balanced binary search tree 2015-06-20 17:14:07 +00:00
DebugInfo Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
ExecutionEngine Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Feature Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
FileCheck
Instrumentation Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
Integer
JitListener
LibDriver Use correct escaping for semicolon on Windows. 2015-06-20 01:28:20 +00:00
Linker
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
MC Revert 240130, it caused crashes (repro in PR23900). 2015-06-19 23:43:47 +00:00
Object Improve error handling of getRelocationAddend. 2015-06-19 20:58:43 +00:00
Other Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
SymbolRewriter
TableGen
tools Improve the --expand-relocs handling of MachO. 2015-06-18 22:38:20 +00:00
Transforms [SLP] Vectorize for all-constant entries. 2015-06-19 17:40:15 +00:00
Unit
Verifier Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh