aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDiana Picus <Diana-Magda.Picus@amd.com>2023-11-10 08:47:04 +0100
committerDiana Picus <Diana-Magda.Picus@amd.com>2023-11-10 09:30:44 +0100
commit20e9e4f797e72bc6006c68e1eb8dbca0d2191851 (patch)
tree631ed2a40ca496d20842a3e27d6a0c51edf0f65f /flang/lib/Frontend/CompilerInvocation.cpp
parent91f92e6a6bfa4a1d963234ba70adb5a7957aeb1e (diff)
downloadllvm-20e9e4f797e72bc6006c68e1eb8dbca0d2191851.zip
llvm-20e9e4f797e72bc6006c68e1eb8dbca0d2191851.tar.gz
llvm-20e9e4f797e72bc6006c68e1eb8dbca0d2191851.tar.bz2
[AMDGPU] si-wqm: Skip only LiveMask COPY
si-wqm sometimes needs to save the LiveMask in the entry block. Later on, while looking for a place to enter WQM/WWM, it unconditionally skips over the first COPY instruction in the entry block. This is incorrect for functions where the LiveMask doesn't need to be saved, and therefore the first COPY is more likely a COPY from a function argument and might need to be in some non-exact mode. This patch fixes the issue by also checking that the source of the COPY is the EXEC register. This produces different code in 3 of the existing tests: In wwm-reserved.ll, a SGPR copy is now inside the WWM area rather than outside. This is benign. In wave32.ll, we end up with an extra register copy. This is because the first COPY in the block is now part of the WWM block, so si-pre-allocate-wwm-regs will allocate a new register for its destination (when it was outside of the WWM region, the register allocator could just re-use the same register). We might be able to improve this in si-pre-allocate-wwm-regs but I haven't looked into it. The same thing happens in dual-source-blend-export.ll, but for that one it's harder to see because of the scheduling changes. I've uploaded the before/after si-wqm output for it here: https://reviews.llvm.org/differential/diff/553445/ Differential Revision: https://reviews.llvm.org/D158841
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions