aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
diff options
context:
space:
mode:
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2016-11-07 23:04:50 +0000
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>2016-11-07 23:04:50 +0000
commit92e01ee90bfa9424dea6dd527cadffe70d9e25a1 (patch)
tree7f23a3d323e515434a7d529ae21424f01b7b4c60 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
parent0298082541696967ffabb9aec12a1a0eff58eea1 (diff)
downloadllvm-92e01ee90bfa9424dea6dd527cadffe70d9e25a1.zip
llvm-92e01ee90bfa9424dea6dd527cadffe70d9e25a1.tar.gz
llvm-92e01ee90bfa9424dea6dd527cadffe70d9e25a1.tar.bz2
[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 and then restore it with yet another v_cmp instruction from that v_cndmask's result. To mitigate the issue a forward propagation of a v_cmp 64 bit result to an user is implemented. Additional side effect of this is that we may consume less VGPRs in a cost of more SGPRs in case if holding of multiple conditions is needed, and that is a clear win in most cases. llvm-svn: 286171
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
0 files changed, 0 insertions, 0 deletions