summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-05-26 20:01:32 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-05-26 20:01:32 +0000
commitf2beccf6b4e9eb59b5080ae866e8d59a38679f15 (patch)
treef6d6e5139cda47ff6b8c8e770d744c5db577ee18 /llvm/lib/Linker/LinkModules.cpp
parent7b01b578a93062fa75cf79f4b8753d539d72f76f (diff)
downloadbcm5719-llvm-f2beccf6b4e9eb59b5080ae866e8d59a38679f15.tar.gz
bcm5719-llvm-f2beccf6b4e9eb59b5080ae866e8d59a38679f15.zip
SelectionDAGBuilder: When emitting small compare chains for switches order them by using edge weights.
SimplifyCFG tends to form a lot of 2-3 case switches when merging branches. Move the most likely condition to the front so it is checked first and the others can be skipped. This is currently not as effective as it could be because SimplifyCFG destroys profiling metadata when merging branches and switches. Merging branch weight metadata is tricky though. This code touches at most 3 cases so I didn't use a proper sorting algorithm. llvm-svn: 157521
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud