[AMDGPU] SIInsertSkips: Refactor early exit block creation
authorCarl Ritson <carl.ritson@amd.com>
Tue, 6 Oct 2020 00:44:50 +0000 (09:44 +0900)
committerCarl Ritson <carl.ritson@amd.com>
Tue, 6 Oct 2020 00:44:55 +0000 (09:44 +0900)
commitc3e07a0018ec74216d662e0596584d2c846a1063
tree1990adb770f667937a483e9cd65f0eb9553f1332
parentea9d6392f4a375b5183be02ac93eb3a75c169360
[AMDGPU] SIInsertSkips: Refactor early exit block creation

Refactor exit block creation to a single call ensureEarlyExitBlock.
Add support for generating an early exit block which clears the
exec mask, but only add this instruction when required.
These changes are to facilitate adding more forms of early
termination for PS shaders in the near future.

Reviewed By: nhaehnle

Differential Revision: https://reviews.llvm.org/D88775
llvm/lib/Target/AMDGPU/SIInsertSkips.cpp