[PATCH] D98917: [AMDGPU] Merge SIRemoveShortExecBranches into SIPreEmitPeephole

Carl Ritson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 18 20:25:44 PDT 2021


critson created this revision.
critson added reviewers: cdevadas, arsenm, foad.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, mgorny, nhaehnle, jvesely, kzhuravl.
critson requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98917

Files:
  llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  llvm/lib/Target/AMDGPU/CMakeLists.txt
  llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp
  llvm/lib/Target/AMDGPU/SIRemoveShortExecBranches.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.wqm.demote.ll
  llvm/test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir
  llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wqm.demote.ll
  llvm/test/CodeGen/AMDGPU/skip-if-dead.ll
  llvm/test/CodeGen/AMDGPU/transform-block-with-return-to-epilog.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98917.331751.patch
Type: text/x-patch
Size: 50060 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210319/0b7f6718/attachment.bin>


More information about the llvm-commits mailing list