[all-commits] [llvm/llvm-project] a3646e: [AMDGPU] Add pseudo wavemode to optimize strict_wqm

Carl Ritson via All-commits all-commits at lists.llvm.org
Thu Oct 27 17:46:09 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a3646ec1bc662e221c2a1d182987257c50958789
      https://github.com/llvm/llvm-project/commit/a3646ec1bc662e221c2a1d182987257c50958789
  Author: Carl Ritson <carl.ritson at amd.com>
  Date:   2022-10-28 (Fri, 28 Oct 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
    M llvm/lib/Target/AMDGPU/SIInstructions.td
    M llvm/lib/Target/AMDGPU/SIPreAllocateWWMRegs.cpp
    M llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
    M llvm/test/CodeGen/AMDGPU/wqm.ll

  Log Message:
  -----------
  [AMDGPU] Add pseudo wavemode to optimize strict_wqm

Strict WQM does not require a WQM transistion if it occurs within
an existing WQM section.
This occurs heavily in GFX11 pixel shaders with LDS_PARAM_LOAD.
Which leads to unnecessary EXEC mask manipulation.

To avoid these transitions, detect WQM -> Strict WQM -> WQM
and substitute new ENTER_PSEUDO_WM/EXIT_PSEUDO_WM markers instead.
These are treat similarly by WWM register pre-allocation pass,
but do not manipulate EXEC or use registers to save EXEC state.

Reviewed By: piotr

Differential Revision: https://reviews.llvm.org/D136813




More information about the All-commits mailing list