Skip to content

Conversation

@vg0204
Copy link

@vg0204 vg0204 commented Oct 28, 2025

This patch introduces SIOptimizeExecMaskingPreRA after AMDGPUWaveTransform pass, but just before SGPR allocation to reduce register pressure for the new pipeline. While at the same time, it still acts as pre-RA pass optimizing EXEC-mask related instructions for legacy pipeline.

It is a follow-up which depended on the #369.

pipeline

This patch introduces SIOptimizeExecMaskingPreRA after
AMDGPUWaveTransform pass, but just before SGPR allocation to
reduce register pressure for the new pipeline. While at the same time,
it still acts as pre-RA pass optimizing EXEC-mask related instructions
for legacy pipeline.
@vg0204 vg0204 requested review from cdevadas and jmmartinez October 28, 2025 08:43
@vg0204 vg0204 self-assigned this Oct 28, 2025
@z1-cciauto
Copy link
Collaborator

Copy link

@jmmartinez jmmartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vg0204 vg0204 merged commit 049cf96 into amd-feature/wave-transform Oct 29, 2025
6 checks passed
@vg0204 vg0204 deleted the amd/dev/vikashgu/enable-SiOptimizeExecMaskingPreRA-waveTransform-pipeline branch October 29, 2025 05:58
// instructions that cause scheduling barriers.
insertPass(&MachineSchedulerID, &SIWholeQuadModeID);

if (!LateWaveTransform && OptExecMaskPreRA)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't change the default behavior. This has to be retained.

addPass(&RegisterCoalescerID);
}

if (OptExecMaskPreRA)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move it inside the LateWaveTransform check.

@vg0204 vg0204 restored the amd/dev/vikashgu/enable-SiOptimizeExecMaskingPreRA-waveTransform-pipeline branch October 29, 2025 08:36
@vg0204 vg0204 deleted the amd/dev/vikashgu/enable-SiOptimizeExecMaskingPreRA-waveTransform-pipeline branch October 29, 2025 08:37
vg0204 added a commit that referenced this pull request Oct 29, 2025
…age for both pipelines. (#422)

We enable the SIOptimizeSexecMaskingPreRA pass just before SGPR
allocation as planned for waveTransform pipeline, while reverting back
to its orginal invocation in the default pipeline.

It is the continuation work on #412 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants