aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-11-04 06:54:00 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-11-04 06:54:00 +0000
commit0f139b4f7164302d5e654dc2b243bb2e2fb1ddfc (patch)
tree231cc67ae926c2d66d211fadea6ae2cc67aba802 /llvm/lib/CodeGen/MachineScheduler.cpp
parent7cbfe23ad49b038cc2e99cef886f074f0e8fbe46 (diff)
downloadllvm-0f139b4f7164302d5e654dc2b243bb2e2fb1ddfc.zip
llvm-0f139b4f7164302d5e654dc2b243bb2e2fb1ddfc.tar.gz
llvm-0f139b4f7164302d5e654dc2b243bb2e2fb1ddfc.tar.bz2
Hoist check for TLI above all of the attempts to use it (including one
of which that is hidden inside a separate function call) and helpfully before building expensive transaction infrastructure. This will avoid crashing when running CGP in a generic mode if we ever managed to hit this case. Note that I spent some time looking at alternatives. CGP is actually used without a TM or TLI in order to do some target-independent testing. Further, all of the neighboring optimization techniques actually have some paths that are effective even in the absence of TLI so this seemed the correct scope at which to check and bypass logic. It still isn't clear that long-term support for missing TM/TLI is the right cost/benefit tradeoff for CGP -- we seem to get relatively little for it and the code is just littered with checks (and assumptions which I suspect are still missing some checks). This at least fixes the potential bug in this code spotted by PVS-Studio, so we've got that going for us. ;] llvm-svn: 285987
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions