-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[RISCV][NFC] Move GenericModel to standalone file #127003
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And fix some typos in comments. In the future, we may add more scheduling info to GenericModel.
@llvm/pr-subscribers-backend-risc-v Author: Pengcheng Wang (wangpc-pp) ChangesAnd fix some typos in comments. In the future, we may add more scheduling info to GenericModel. Full diff: https://github.com/llvm/llvm-project/pull/127003.diff 3 Files Affected:
diff --git a/llvm/lib/Target/RISCV/RISCV.td b/llvm/lib/Target/RISCV/RISCV.td
index 87c07c3cd505f..1e7ce136dc327 100644
--- a/llvm/lib/Target/RISCV/RISCV.td
+++ b/llvm/lib/Target/RISCV/RISCV.td
@@ -46,6 +46,7 @@ include "RISCVMacroFusion.td"
// RISC-V Scheduling Models
//===----------------------------------------------------------------------===//
+include "RISCVSchedGeneric.td"
include "RISCVSchedMIPSP8700.td"
include "RISCVSchedRocket.td"
include "RISCVSchedSiFive7.td"
diff --git a/llvm/lib/Target/RISCV/RISCVProcessors.td b/llvm/lib/Target/RISCV/RISCVProcessors.td
index c54afa1e6e72e..05fcbfd42b092 100644
--- a/llvm/lib/Target/RISCV/RISCVProcessors.td
+++ b/llvm/lib/Target/RISCV/RISCVProcessors.td
@@ -88,15 +88,6 @@ class RISCVTuneProcessorModel<string n,
defvar GenericTuneFeatures = [TuneOptimizedNF2SegmentLoadStore];
-// Adjust the default cost model to enable all heuristics, not just latency
-// In particular, this enables register pressure heustics which are very
-// important for high LMUL vector code, and have little negative impact
-// on other configurations,
-def GenericModel : SchedMachineModel {
- let MicroOpBufferSize = 1;
- let CompleteModel = 0;
-}
-
def GENERIC_RV32 : RISCVProcessorModel<"generic-rv32",
GenericModel,
[Feature32Bit,
diff --git a/llvm/lib/Target/RISCV/RISCVSchedGeneric.td b/llvm/lib/Target/RISCV/RISCVSchedGeneric.td
new file mode 100644
index 0000000000000..a10cf624aa3a4
--- /dev/null
+++ b/llvm/lib/Target/RISCV/RISCVSchedGeneric.td
@@ -0,0 +1,18 @@
+//===-- RISCVSchedGeneric.td - Generic In-order Processor --*- tablegen -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// Adjust the default cost model to enable all scheduling heuristics, not just
+// latency.
+//
+// In particular, this enables register pressure heuristics which are very
+// important for vector code with high LMULs, and have little negative impact
+// on other configurations.
+def GenericModel : SchedMachineModel {
+ let MicroOpBufferSize = 1;
+ let CompleteModel = 0;
+}
|
lenary
approved these changes
Feb 13, 2025
topperc
approved these changes
Feb 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lukel97
approved these changes
Feb 13, 2025
flovent
pushed a commit
to flovent/llvm-project
that referenced
this pull request
Feb 13, 2025
And fix some typos in comments. In the future, we may add more scheduling info to GenericModel.
joaosaffran
pushed a commit
to joaosaffran/llvm-project
that referenced
this pull request
Feb 14, 2025
And fix some typos in comments. In the future, we may add more scheduling info to GenericModel.
sivan-shani
pushed a commit
to sivan-shani/llvm-project
that referenced
this pull request
Feb 24, 2025
And fix some typos in comments. In the future, we may add more scheduling info to GenericModel.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
And fix some typos in comments.
In the future, we may add more scheduling info to GenericModel.