[PATCH] D75910: [AMDGPU] Improve scheduling model for VOP3b instructions

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 03:47:29 PDT 2020


foad marked 2 inline comments as done.
foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SISchedule.td:32
+// write operand of an instruction that also writes a VGPR result.
+def WriteVCC    : SchedWrite;
+
----------------
rampitec wrote:
> The name suggests it is any VCC write, which is not so. In addition it is not always a VCC. Maybe change to WriteAuxSGPR?
> The name suggests it is any VCC write, which is not so.

Good point. I will try to come up with a better name.

> In addition it is not always a VCC.

True but the name gives you a hint that it is //usually// VCC (i.e. we try to persuade the register allocator to use VCC, and if it does then we can use a smaller instruction encoding).


================
Comment at: llvm/test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll:1336
+; GFX8-NEXT:    v_readfirstlane_b32 s0, v1
+; GFX8-NEXT:    v_add_u32_e32 v1, vcc, v4, v3
 ; GFX8-NEXT:    v_mov_b32_e32 v2, s1
----------------
rampitec wrote:
> What about AMDGPUMacroFusion which tries to do exactly the opposite?
Why do you say "the opposite"? Macro fusion tries to put the v_add next to the v_addc (but apparently it fails in this case). My patch should not stop this from working.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75910/new/

https://reviews.llvm.org/D75910





More information about the llvm-commits mailing list