llvm-project/llvm/test
Hans Wennborg 6ed81cbcdb 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.

llvm-svn: 240224
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 IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
Bitcode Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
BugPoint IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
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 [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
JitListener IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
LTO Move the personality function from LandingPadInst to Function 2015-06-17 20:52:32 +00:00
LibDriver Use correct escaping for semicolon on Windows. 2015-06-20 01:28:20 +00:00
Linker Changed renaming of local symbols by inserting a dot vefore the numeric suffix. 2015-05-12 16:47:30 +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 Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +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 YAML: Implement block scalar parsing. 2015-05-13 23:10:51 +00:00
tools Improve the --expand-relocs handling of MachO. 2015-06-18 22:38:20 +00:00
.clang-format
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
Makefile test: Make a start on a test suite for libLTO. 2015-03-19 23:55:38 +00:00
Makefile.tests
TestRunner.sh
lit.cfg LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
lit.site.cfg.in test: Make a start on a test suite for libLTO. 2015-03-19 23:55:38 +00:00