summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2018-10-31 13:27:08 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2018-10-31 13:27:08 +0000
commit814abb59dfdb354ca246a66217b3b3a9f7ac4aa5 (patch)
tree1ee4b8ef083603e15db53dfe6e7e6ec21e54ac14 /llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
parent28212cc6891559855d41066d68e64a84097bb749 (diff)
downloadbcm5719-llvm-814abb59dfdb354ca246a66217b3b3a9f7ac4aa5.tar.gz
bcm5719-llvm-814abb59dfdb354ca246a66217b3b3a9f7ac4aa5.zip
AMDGPU: Rewrite SILowerI1Copies to always stay on SALU
Summary: Instead of writing boolean values temporarily into 32-bit VGPRs if they are involved in PHIs or are observed from outside a loop, we use bitwise masking operations to combine lane masks in a way that is consistent with wave control flow. Move SIFixSGPRCopies to before this pass, since that pass incorrectly attempts to move SGPR phis to VGPRs. This should recover most of the code quality that was lost with the bug fix in "AMDGPU: Remove PHI loop condition optimization". There are still some relevant cases where code quality could be improved, in particular: - We often introduce redundant masks with EXEC. Ideally, we'd have a generic computeKnownBits-like analysis to determine whether masks are already masked by EXEC, so we can avoid this masking both here and when lowering uniform control flow. - The criterion we use to determine whether a def is observed from outside a loop is conservative: it doesn't check whether (loop) branch conditions are uniform. Change-Id: Ibabdb373a7510e426b90deef00f5e16c5d56e64b Reviewers: arsenm, rampitec, tpr Subscribers: kzhuravl, jvesely, wdng, mgorny, yaxunl, dstuttard, t-tye, eraman, llvm-commits Differential Revision: https://reviews.llvm.org/D53496 llvm-svn: 345719
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud