This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Mark s_endpgm convergent
AbandonedPublic

Authored by rampitec on Jun 5 2019, 6:55 PM.

Details

Reviewers
arsenm
Summary

This shall prevent tail duplication of blocks with s_endpgm.

Diff Detail

Event Timeline

rampitec created this revision.Jun 5 2019, 6:55 PM
arsenm requested changes to this revision.Jun 5 2019, 7:05 PM

The concept of convergence we have breaks down at the machine level. At the machine level, we don't exactly need to think about the operations treated in the IR as convergent as related to control flow anymore. s_endpgm doesn't really have the convergent properties anyway

This revision now requires changes to proceed.Jun 5 2019, 7:05 PM

The concept of convergence we have breaks down at the machine level. At the machine level, we don't exactly need to think about the operations treated in the IR as convergent as related to control flow anymore. s_endpgm doesn't really have the convergent properties anyway

You cannot duplicate it by moving into the control flow. If you move it into the 'if..then' block that will prevent subsequent 'else' from from execution. How do you propose to shield it from duplication?

I also don't understand the purpose of this and what this solves.

Convergent is defined as "may not be modified to have additional control dependencies". However, at the MIR level our branches are all effectively scalar, so adding control dependencies should actually always be okay.

rampitec abandoned this revision.Jun 18 2019, 11:02 AM