[all-commits] [llvm/llvm-project] 5df2af: [AMDGPU] Merge SIRemoveShortExecBranches into SIPr...

Carl Ritson via All-commits all-commits at lists.llvm.org
Fri Mar 19 19:27:40 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5df2af8b0ef33f48b1ee72bcd27bc609b898da52
      https://github.com/llvm/llvm-project/commit/5df2af8b0ef33f48b1ee72bcd27bc609b898da52
  Author: Carl Ritson <carl.ritson at amd.com>
  Date:   2021-03-20 (Sat, 20 Mar 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPU.h
    M llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
    M llvm/lib/Target/AMDGPU/CMakeLists.txt
    M llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
    R llvm/lib/Target/AMDGPU/SIRemoveShortExecBranches.cpp
    M llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.wqm.demote.ll
    M llvm/test/CodeGen/AMDGPU/insert-skips-flat-vmem-ds.mir
    M llvm/test/CodeGen/AMDGPU/insert-skips-gws.mir
    M llvm/test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wqm.demote.ll
    M llvm/test/CodeGen/AMDGPU/remove-short-exec-branches-gpr-idx-mode.mir
    M llvm/test/CodeGen/AMDGPU/remove-short-exec-branches-special-instructions.mir
    M llvm/test/CodeGen/AMDGPU/skip-branch-taildup-ret.mir
    M llvm/test/CodeGen/AMDGPU/skip-if-dead.ll
    M llvm/test/CodeGen/AMDGPU/transform-block-with-return-to-epilog.ll
    M llvm/utils/gn/secondary/llvm/lib/Target/AMDGPU/BUILD.gn

  Log Message:
  -----------
  [AMDGPU] Merge SIRemoveShortExecBranches into SIPreEmitPeephole

SIRemoveShortExecBranches is an optimisation so fits well in the
context of SIPreEmitPeephole.

Test changes relate to early termination from kills which have now
been lowered prior to considering branches for removal.
As these use s_cbranch the execz skips are now retained instead.
Currently either behaviour is valid as kill with EXEC=0 is a nop;
however, if early termination is used differently in future then
the new behaviour is the correct one.

Reviewed By: foad

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




More information about the All-commits mailing list