summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/InlineCost.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-09-19 07:48:16 +0000
committerHans Wennborg <hans@hanshq.net>2012-09-19 07:48:16 +0000
commit02fbc716479de79f4449ea021b60208017829d74 (patch)
treeb67a43bd6095a536eeae0b0f7221e40278333dc9 /llvm/lib/Analysis/InlineCost.cpp
parent11b9e97cd98450257486b22306e517cc39ec99df (diff)
downloadbcm5719-llvm-02fbc716479de79f4449ea021b60208017829d74.tar.gz
bcm5719-llvm-02fbc716479de79f4449ea021b60208017829d74.zip
CodeGenPrep: turn lookup tables into switches for some targets.
This is a follow-up from r163302, which added a transformation to SimplifyCFG that turns some switches into loads from lookup tables. It was pointed out that some targets, such as GPUs and deeply embedded targets, might not find this appropriate, but SimplifyCFG doesn't have enough information about the target to decide this. This patch adds the reverse transformation to CodeGenPrep: it turns loads from lookup tables back into switches for targets where we do not build jump tables (assuming these are also the targets where lookup tables are inappropriate). Hopefully we will eventually get to have target information in SimplifyCFG, and then this CodeGenPrep transformation can be removed. llvm-svn: 164206
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud