[PATCH] D82737: [AMDGPU] Insert PS early exit at end of control flow
Carl Ritson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 29 22:00:30 PDT 2020
critson marked 2 inline comments as done.
critson added a comment.
In D82737#2119798 <https://reviews.llvm.org/D82737#2119798>, @nhaehnle wrote:
> Can you explain the reasoning behind how you decide where to insert SI_KILL_CLEANUP?
I will add this as a comment in the code (because apparently I forgot):
SI_KILL_CLEANUP is inserted immediately after SI_END_CF for control flow where a kill is present.
When SI_KILL_CLEANUP is uniformly reached it will become a test of the EXEC mask immediately after it has been updated by the SI_END_CF to reflect the true state of live lanes.
We could actually blindly insert SI_KILL_CLEANUP after every SI_END_CF, reducing the code complexity, but we'd end up with a lot of early exits that would never be taken.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstructions.td:382-383
+let Defs = [EXEC] in
+def SI_KILL_CLEANUP : SPseudoInstSI <(outs), (ins)>;
+
----------------
nhaehnle wrote:
> Shouldn't this also Use EXEC?
It does, this entire block of instructions is Use EXEC.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82737/new/
https://reviews.llvm.org/D82737
More information about the llvm-commits
mailing list