Skip to content

[AMDGPU] Cluster export instruction in PostRA Scheduler #141399

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

perlfu
Copy link
Contributor

@perlfu perlfu commented May 25, 2025

DAG mutation needs to be applied post-RA to maintain order established during pre-RA scheduler.

@perlfu perlfu requested review from jayfoad and arsenm May 25, 2025 07:55
@llvmbot
Copy link
Member

llvmbot commented May 25, 2025

@llvm/pr-subscribers-backend-amdgpu

Author: Carl Ritson (perlfu)

Changes

DAG mutation needs to be applied post-RA to maintain order established during pre-RA scheduler.


Full diff: https://github.com/llvm/llvm-project/pull/141399.diff

1 Files Affected:

  • (modified) llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp (+1)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
index e24d8481408ad..7479703ce353a 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -1129,6 +1129,7 @@ GCNTargetMachine::createPostMachineScheduler(MachineSchedContext *C) const {
        getOptLevel() >= CodeGenOptLevel::Less) &&
       EnableVOPD)
     DAG->addMutation(createVOPDPairingMutation());
+  DAG->addMutation(createAMDGPUExportClusteringDAGMutation());
   return DAG;
 }
 //===----------------------------------------------------------------------===//

perlfu added 2 commits May 25, 2025 17:01
DAG mutation needs to be applied post-RA to maintain order
established during pre-RA scheduler.
@perlfu perlfu force-pushed the amdgpu-postra-exp-cluster branch from 35b663e to 0eb864e Compare May 25, 2025 08:17
@arsenm
Copy link
Contributor

arsenm commented May 25, 2025

Maybe this can only apply post-RA?

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.

3 participants