This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Mark waterfall loops as SI_WATERFALL_LOOP
ClosedPublic

Authored by sebastian-ne on Jul 6 2021, 2:28 AM.

Details

Summary

This way, they can be detected later, e.g. by the
SIOptimizeVGPRLiveRange pass.

Diff Detail

Event Timeline

sebastian-ne created this revision.Jul 6 2021, 2:28 AM
sebastian-ne requested review of this revision.Jul 6 2021, 2:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 6 2021, 2:28 AM
foad added inline comments.Jul 6 2021, 3:00 AM
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
426

Can you use MachineInstr::setDesc to mutate MI into an S_CBRANCH_EXECNZ, instead of creating a new instruction and erasing the old one?

llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp
174

Is this a change in behaviour? Previously we used an S_CBRANCH_EXECNZ which would not set Divergent here.

sebastian-ne marked 2 inline comments as done.

Thanks for the review. I didn’t intend to change the behavior.

foad accepted this revision.Jul 6 2021, 3:20 AM

Looks OK to me assuming D105192 gets approved.

This revision is now accepted and ready to land.Jul 6 2021, 3:20 AM
This revision was automatically updated to reflect the committed changes.