[PATCH] D67101: Target hooks for custom COPY insertion.

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 3 08:03:42 PDT 2019


alex-t created this revision.
alex-t added a reviewer: rampitec.
Herald added subscribers: hiraditya, nhaehnle, jvesely, arsenm.
Herald added a project: LLVM.

PHI Elimination pass relies on TargetInstrInfo::isBlockPrologue/isTerminator target hooks to determine the COPY insertion points.
In some cases this is not sufficient. Divergent control flow requires instructions that belong to block prologue and consume registers defined by the PHI node in the same block.
2 new hooks were added to allow target to override the default COPY placement if necessary or fall through to the base class method otherwise.


https://reviews.llvm.org/D67101

Files:
  llvm/include/llvm/CodeGen/TargetInstrInfo.h
  llvm/lib/CodeGen/PHIElimination.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
  llvm/lib/Target/AMDGPU/SIInstrInfo.h
  llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67101.218457.patch
Type: text/x-patch
Size: 7539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190903/c20775a8/attachment.bin>


More information about the llvm-commits mailing list