aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-10-14 22:46:19 +0000
committerPhilip Reames <listmail@philipreames.com>2015-10-14 22:46:19 +0000
commitb42db21de8f34ea2470f29813d7799387742c87f (patch)
treee2c76b04b5f0e3f57a1699ded1720fc4f9e8b554 /llvm/lib/MC/MCObjectFileInfo.cpp
parentc078ae3e4fb334c6ff7ffea04da21a989d0b8296 (diff)
downloadllvm-b42db21de8f34ea2470f29813d7799387742c87f.zip
llvm-b42db21de8f34ea2470f29813d7799387742c87f.tar.gz
llvm-b42db21de8f34ea2470f29813d7799387742c87f.tar.bz2
[SimplifyCFG] Speculatively flatten CFG based on profiling metadata
If we have a series of branches which are all unlikely to fail, we can possibly combine them into a single check on the fastpath combined with a bit of dispatch logic on the slowpath. We don't want to do this unconditionally since it requires speculating instructions past a branch, but if the profiling metadata on the branch indicates profitability, this can reduce the number of checks needed along the fast path. The canonical example this is trying to handle is removing the second bounds check implied by the Java code: a[i] + a[i+1]. Note that it can currently only do so for really simple conditions and the values of a[i] can't be used anywhere except in the addition. (i.e. the load has to have been sunk already and not prevent speculation.) I plan on extending this transform over the next few days to handle alternate sequences. Differential Revision: http://reviews.llvm.org/D13070 llvm-svn: 250343
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
0 files changed, 0 insertions, 0 deletions