Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swedev 414443 #65947

Closed
wants to merge 2 commits into from
Closed

Conversation

petar-avramovic
Copy link
Collaborator

No description provided.

SWEDEV-414443. Fixes performance regression introduced by D155343.
Allows sinking in a simple case when there are no loops.
@@ -171,6 +171,39 @@ bool SIInstrInfo::isIgnorableUse(const MachineOperand &MO) const {
isVALU(*MO.getParent()) && !resultDependsOnExec(*MO.getParent());
}

bool SIInstrInfo::modifiesRegisterImplicitly(
Copy link
Contributor

Choose a reason for hiding this comment

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

We have an ever growing set of convoluted callbacks to deal with this problem. I think we need to look into moving some of the modeling of this into the CFG itself. I think we need to mark block edges as convergent/divergent/something

// SI_END_CF restores exec mask as it was before SI_IF (unchanged)
Register EndCF = ModifierInstr->getOperand(0).getReg();
MachineInstr *SIIF = MRI.getVRegDef(EndCF);
if (SIIF->getOpcode() == AMDGPU::SI_IF && MRI.hasOneUse(EndCF) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't even work after lowering

@arsenm
Copy link
Contributor

arsenm commented Sep 11, 2023

Description needs to be what this is doing, the swdev thing should be a comment footer

@arsenm
Copy link
Contributor

arsenm commented Nov 30, 2023

Is this still relevant? I thought a newer patch fixed the same issue?

@petar-avramovic
Copy link
Collaborator Author

Implemented in #67456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants