[PATCH] D59295: [AMDGPU] Pre-allocate WWM registers to reduce VGPR pressure.

Connor Abbott via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 12:19:09 PDT 2019


cwabbott added inline comments.


================
Comment at: lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp:222-227
+      if (MI.getOpcode() == AMDGPU::S_OR_SAVEEXEC_B64 &&
+          MI.getOperand(1).isImm() && MI.getOperand(1).getImm() == -1) {
+        LLVM_DEBUG(dbgs() << "entering WWM region: " << MI << "\n");
+        InWWM = true;
+        continue;
+      }
----------------
arsenm wrote:
> I don't like this hardcoded opcode check. Why is S_OR_SAVEEXEC_B64 special?
IIRC I wrote this since WholeQuadMode currently just emits a S_OR_SAVEEXEC_B64 foo, -1 in order to start WWM, so you have to check it manually in order to know when WWM starts. Maybe it's better to got back and add a ENTER_WWM pseudoinstruction like the pre-existing EXIT_WWM.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59295





More information about the llvm-commits mailing list