Skip to content

[AMDGPU] VGPR instruction placement should be aware of exec mask prol…#175080

Closed
carlobertolli wants to merge 1 commit intollvm:mainfrom
carlobertolli:fix_spills_amdgpu_splitkit_specialization.tr
Closed

[AMDGPU] VGPR instruction placement should be aware of exec mask prol…#175080
carlobertolli wants to merge 1 commit intollvm:mainfrom
carlobertolli:fix_spills_amdgpu_splitkit_specialization.tr

Conversation

@carlobertolli
Copy link
Member

…ogues.

This patch changes the insertion logic for VGPR modifying instruction to skip to after the exec mask is reset, if such an instruction is present in the basic block. It is used to prevent placement of scratch store/load for VGPRs before the exec mask is reset on AMDGPUs.

…ogues.

This patch changes the insertion logic for VGPR modifying instruction to skip to after the exec mask is reset, if such an instruction is present in the basic block.
It is used to prevent placement of scratch store/load for VGPRs before the exec mask is reset on AMDGPUs.
Copy link
Collaborator

@cdevadas cdevadas left a comment

Choose a reason for hiding this comment

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

Introducing another target hook while retaining isBasicBlockPrologue would increase the complexity further. This approach doesn't seem like a favorable one for addressing our problem.

/// a basic block. This is used by the register allocator's live range
/// splitting logic.
virtual MachineBasicBlock::iterator
getExecAwareInsertPoint(MachineBasicBlock &MBB, Register Reg) const;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should use a generic name without any target-dependent register details in a common file.

@carlobertolli
Copy link
Member Author

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.

2 participants