[PATCH] D116053: [MachineSink] Allow sinking of constant or ignorable physreg uses

Vang Thao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 20 12:33:20 PST 2021


vangthao created this revision.
Herald added subscribers: kerbowa, arphaman, hiraditya, tpr, nhaehnle, jvesely.
vangthao requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

For AMDGPU, any use of the physical register EXEC prevents sinking even if it is not a real physical register read. Add check to see if a physical
register use can be ignored for sinking.

Also perform same constant and ignorable physical register check when considering sinking in loops.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116053

Files:
  llvm/include/llvm/CodeGen/TargetInstrInfo.h
  llvm/lib/CodeGen/MachineSink.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/sdiv.i64.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/srem.i64.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/udiv.i64.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/urem.i64.ll
  llvm/test/CodeGen/AMDGPU/frame-index-elimination.ll
  llvm/test/CodeGen/AMDGPU/machine-sink-ignorable-exec-use.mir
  llvm/test/CodeGen/AMDGPU/mul24-pass-ordering.ll
  llvm/test/CodeGen/AMDGPU/skip-if-dead.ll
  llvm/test/CodeGen/AMDGPU/stack-pointer-offset-relative-frameindex.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116053.395511.patch
Type: text/x-patch
Size: 95942 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211220/78220e7a/attachment.bin>


More information about the llvm-commits mailing list