summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/X86RecognizableInstr.h
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-01-15 05:00:27 +0000
committerHans Wennborg <hans@hanshq.net>2014-01-15 05:00:27 +0000
commit4744ac17335f208e14ccb9b2fc334d103d9086a7 (patch)
tree9b03807464739412b5cbaceb2102fa325e810afa /llvm/utils/TableGen/X86RecognizableInstr.h
parent5cf521047f6a3c5479e50b482f8dfb33de312316 (diff)
downloadbcm5719-llvm-4744ac17335f208e14ccb9b2fc334d103d9086a7.tar.gz
bcm5719-llvm-4744ac17335f208e14ccb9b2fc334d103d9086a7.zip
Switch-to-lookup tables: set threshold to 3 cases
There has been an old FIXME to find the right cut-off for when it's worth analyzing and potentially transforming a switch to a lookup table. The switches always have two or more cases. I could not measure any speed-up by transforming a switch with two cases. A switch with three cases gets a nice speed-up, and I couldn't measure any compile-time regression, so I think this is the right threshold. In a Clang self-host, this causes 480 new switches to be transformed, and reduces the final binary size with 8 KB. llvm-svn: 199294
Diffstat (limited to 'llvm/utils/TableGen/X86RecognizableInstr.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud