diff options
author | Hans Wennborg <hans@hanshq.net> | 2015-04-30 00:57:37 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2015-04-30 00:57:37 +0000 |
commit | 4b828d35fdf85c384170f930dcbf3013d22f1eb2 (patch) | |
tree | 8556e07ec5eebe0e85dd241f3d3fe4c43e35f8a0 /llvm/lib/Bitcode/Reader | |
parent | 2c9608b3b3729d6c7682614f507036a2fcec6b7a (diff) | |
download | bcm5719-llvm-4b828d35fdf85c384170f930dcbf3013d22f1eb2.tar.gz bcm5719-llvm-4b828d35fdf85c384170f930dcbf3013d22f1eb2.zip |
Switch lowering: use profile info to build weight-balanced binary search trees
This will cause hot nodes to appear closer to the root.
The literature says building the tree like this makes it a near-optimal (in
terms of search time given key frequencies) binary search tree. In LLVM's case,
we can do up to 3 comparisons in each leaf node, so it might be better to opt
for lower tree height in some cases; that's something to look into in the
future.
Differential Revision: http://reviews.llvm.org/D9318
llvm-svn: 236192
Diffstat (limited to 'llvm/lib/Bitcode/Reader')
0 files changed, 0 insertions, 0 deletions