Skip to content

[RISCV] Remove getPostRAMutations #117527

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

Merged

Conversation

wangpc-pp
Copy link
Contributor

We are using PostMachineScheduler instead of PostRAScheduler
since #68696.

The hook getPostRAMutations is only used in PostRAScheduler so
it is actually dead code for RISC-V now.

We are using `PostMachineScheduler` instead of `PostRAScheduler`
since llvm#68696.

The hook `getPostRAMutations` is only used in `PostRAScheduler` so
it is actually dead code for RISC-V now.
@llvmbot
Copy link
Member

llvmbot commented Nov 25, 2024

@llvm/pr-subscribers-backend-risc-v

Author: Pengcheng Wang (wangpc-pp)

Changes

We are using PostMachineScheduler instead of PostRAScheduler
since #68696.

The hook getPostRAMutations is only used in PostRAScheduler so
it is actually dead code for RISC-V now.


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

2 Files Affected:

  • (modified) llvm/lib/Target/RISCV/RISCVSubtarget.cpp (-5)
  • (modified) llvm/lib/Target/RISCV/RISCVSubtarget.h (-3)
diff --git a/llvm/lib/Target/RISCV/RISCVSubtarget.cpp b/llvm/lib/Target/RISCV/RISCVSubtarget.cpp
index 03397e1e0d89ee..426d3682049046 100644
--- a/llvm/lib/Target/RISCV/RISCVSubtarget.cpp
+++ b/llvm/lib/Target/RISCV/RISCVSubtarget.cpp
@@ -186,11 +186,6 @@ bool RISCVSubtarget::useRVVForFixedLengthVectors() const {
 
 bool RISCVSubtarget::enableSubRegLiveness() const { return true; }
 
-void RISCVSubtarget::getPostRAMutations(
-    std::vector<std::unique_ptr<ScheduleDAGMutation>> &Mutations) const {
-  Mutations.push_back(createMacroFusionDAGMutation(getMacroFusions()));
-}
-
   /// Enable use of alias analysis during code generation (during MI
   /// scheduling, DAGCombine, etc.).
 bool RISCVSubtarget::useAA() const { return UseAA; }
diff --git a/llvm/lib/Target/RISCV/RISCVSubtarget.h b/llvm/lib/Target/RISCV/RISCVSubtarget.h
index f2c0a3d85c998a..043838e13b964d 100644
--- a/llvm/lib/Target/RISCV/RISCVSubtarget.h
+++ b/llvm/lib/Target/RISCV/RISCVSubtarget.h
@@ -301,9 +301,6 @@ class RISCVSubtarget : public RISCVGenSubtargetInfo {
 
   bool enableSubRegLiveness() const override;
 
-  void getPostRAMutations(std::vector<std::unique_ptr<ScheduleDAGMutation>>
-                              &Mutations) const override;
-
   bool useAA() const override;
 
   unsigned getCacheLineSize() const override {

Copy link
Collaborator

@preames preames left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@michaelmaitland michaelmaitland left a comment

Choose a reason for hiding this comment

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

LGTM.

On another note, have we looked at using the MacroFusionDAGMutation for PostMachineSched?

@topperc
Copy link
Collaborator

topperc commented Nov 25, 2024

LGTM.

On another note, have we looked at using the MacroFusionDAGMutation for PostMachineSched?

It's handled in llvm::createGenericSchedPostRA already

Copy link
Collaborator

@topperc topperc left a comment

Choose a reason for hiding this comment

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

LGTM

@wangpc-pp wangpc-pp merged commit 6633916 into llvm:main Nov 26, 2024
10 checks passed
@wangpc-pp wangpc-pp deleted the main-riscv-remote-post-ra-mutions-impl branch November 26, 2024 02:57
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.

5 participants