summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2016-11-28 18:58:49 +0000
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2016-11-28 18:58:49 +0000
commit0ee250eee84da1fbcf94eaf5595420abdb8228e5 (patch)
tree246845b71dfb94ea6e5ee56c34ef332fa21c6e30 /llvm/lib/CodeGen/MachineScheduler.cpp
parentcaaa82d90d8ca32d505ab388cef18abe4760b758 (diff)
downloadbcm5719-llvm-0ee250eee84da1fbcf94eaf5595420abdb8228e5.tar.gz
bcm5719-llvm-0ee250eee84da1fbcf94eaf5595420abdb8228e5.zip
[AMDGPU] Allow hoisting of comparisons out of a loop and eliminate condition copies
Codegen prepare sinks comparisons close to a user is we have only one register for conditions. For AMDGPU we have many SGPRs capable to hold vector conditions. Changed BE to report we have many condition registers. That way IR LICM pass would hoist an invariant comparison out of a loop and codegen prepare will not sink it. With that done a condition is calculated in one block and used in another. Current behavior is to store workitem's condition in a VGPR using v_cndmask_b32 and then restore it with yet another v_cmp instruction from that v_cndmask's result. To mitigate the issue a propagation of source SGPR pair in place of v_cmp is implemented. Additional side effect of this is that we may consume less VGPRs at a cost of more SGPRs in case if holding of multiple conditions is needed, and that is a clear win in most cases. Differential Revision: https://reviews.llvm.org/D26114 llvm-svn: 288053
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud