[PATCH] D87107: [AMDGPU] Target hook to apply target specific split constraint

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 12:47:24 PDT 2020


rampitec added a comment.

I do not think it shall be at a block level. You can allow splitting after all exec modifications are done. For example:

  bb.1:
    ; fall-thru
  bb.2:
    s_or_b64 exec, exec, mask
    ; a valid split point

I.e. you may skip the iterator until you see a non-exec modifying and non-terminator instruction. You would also need to skip the block to the only successor. In that example you would disallow split in the bb.1, you would also disallow split in bb.2 before s_or_b64, but that is perfectly valid to split it after s_or_b64. The code as written would prohinit any splits in the bb.2 which is an overkill.

I would rather modify the interface of isBasicBlockPrologue() (and rename it) to account for a fall-thru case and do a search for a valid split point. In fact it is also needed for spill reloads, and that interface was created for spill reloads. In that case isBasicBlockPrologue() would need to return not just an iterator, but also a new block, and potentially it may prohibit any spilling/splitting at all if it cannot find a valid place to do it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87107/new/

https://reviews.llvm.org/D87107



More information about the llvm-commits mailing list