[PATCH] D46470: [AMDGPU] Fixed a couple of SIFixWWMLiveness problems

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 4 14:00:38 PDT 2018


tpr created this revision.
Herald added subscribers: llvm-commits, t-tye, dstuttard, yaxunl, nhaehnle, wdng, kzhuravl, arsenm.
tpr added reviewers: nhaehnle, cwabbott.

1. Where SIFixWWMLiveness adds dummy operands to EXIT_WWM, remove kill

marks from other uses of the same register to avoid the MIR becoming
invalid.

2. SIFixWWMLiveness's scheme for finding registers that might be live in

disabled lanes at the point of the WWM code involves finding defs that
reach the WWM code, and would be considered live if all defs are
considered partial defs.

That scheme could find false positives in defs that do not dominate the
WWM code, and thus do not really have a live value reaching it in any
lane. The two problems with adding a dummy operand for such a register
to EXIT_WWM are (a) it is over-conservative, and (b) it violates
MachineVerifier's check that all uses are fully defined, even if
sometimes by an IMPLICIT_DEF that arises from a undef phi input.

This commit fixes it by only considering defs that dominate the
EXIT_WWM.

Change-Id: I3d70f6138798c3aaa8b6bdf290d4eb85c7beb311


Repository:
  rL LLVM

https://reviews.llvm.org/D46470

Files:
  lib/Target/AMDGPU/SIFixWWMLiveness.cpp
  test/CodeGen/AMDGPU/wwm-implicit-operands.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46470.145289.patch
Type: text/x-patch
Size: 15573 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180504/3c70816b/attachment.bin>


More information about the llvm-commits mailing list