[PATCH] D68092: Invert the handling of skip insertion.

Christudasan Devadasan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 10:37:03 PDT 2019


cdevadas created this revision.
cdevadas added a reviewer: arsenm.
Herald added subscribers: llvm-commits, mgorny, nhaehnle, wdng, jvesely, qcolombet, MatzeB.
Herald added a project: LLVM.

Current implementation of skip insertion (SIInsertSkip) makes it a mandatory pass
required for correctness. The idea was to have this handling as an optional pass.
This patch inserts the s_cbranch_execz upfront during SILowerControlFlow to skip over
the sections of code when no lanes are active. SIRemoveShortExecBranches tries to
remove the skips for short branches. It also tries to retain s_cbranch_execz
for the cases where the skip branch may be necessary.

The new pass, SIRemoveShortExecBranches will replace the handling of
skip insertion in the existing SIInsertSkip Pass.


Repository:
  rL LLVM

https://reviews.llvm.org/D68092

Files:
  lib/Target/AMDGPU/AMDGPU.h
  lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  lib/Target/AMDGPU/CMakeLists.txt
  lib/Target/AMDGPU/SIInsertSkips.cpp
  lib/Target/AMDGPU/SILowerControlFlow.cpp
  lib/Target/AMDGPU/SIRemoveShortExecBranches.cpp
  test/CodeGen/AMDGPU/atomic_optimizations_local_pointer.ll
  test/CodeGen/AMDGPU/atomic_optimizations_pixelshader.ll
  test/CodeGen/AMDGPU/branch-condition-and.ll
  test/CodeGen/AMDGPU/branch-relaxation.ll
  test/CodeGen/AMDGPU/call-skip.ll
  test/CodeGen/AMDGPU/collapse-endcf.ll
  test/CodeGen/AMDGPU/control-flow-fastregalloc.ll
  test/CodeGen/AMDGPU/convergent-inlineasm.ll
  test/CodeGen/AMDGPU/divergent-branch-uniform-condition.ll
  test/CodeGen/AMDGPU/else.ll
  test/CodeGen/AMDGPU/hoist-cond.ll
  test/CodeGen/AMDGPU/insert-skips-flat-vmem.mir
  test/CodeGen/AMDGPU/insert-skips-gws.mir
  test/CodeGen/AMDGPU/insert-skips-ignored-insts.mir
  test/CodeGen/AMDGPU/insert-skips-kill-uncond.mir
  test/CodeGen/AMDGPU/mubuf-legalize-operands.ll
  test/CodeGen/AMDGPU/mul24-pass-ordering.ll
  test/CodeGen/AMDGPU/ret_jump.ll
  test/CodeGen/AMDGPU/si-annotate-cf-noloop.ll
  test/CodeGen/AMDGPU/si-lower-control-flow-unreachable-block.ll
  test/CodeGen/AMDGPU/si-lower-control-flow.mir
  test/CodeGen/AMDGPU/skip-branch-taildup-ret.mir
  test/CodeGen/AMDGPU/skip-branch-trap.ll
  test/CodeGen/AMDGPU/skip-if-dead.ll
  test/CodeGen/AMDGPU/subreg-coalescer-undef-use.ll
  test/CodeGen/AMDGPU/uniform-cfg.ll
  test/CodeGen/AMDGPU/uniform-loop-inside-nonuniform.ll
  test/CodeGen/AMDGPU/valu-i1.ll
  test/CodeGen/AMDGPU/wave32.ll
  test/CodeGen/AMDGPU/wqm.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68092.221984.patch
Type: text/x-patch
Size: 43841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190926/cf0b9019/attachment-0001.bin>


More information about the llvm-commits mailing list