-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[RISCV] Rename some Feature* to Tune* #117966
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
wangpc-pp
merged 1 commit into
llvm:main
from
wangpc-pp:main-riscv-rename-feature-to-tune
Nov 28, 2024
Merged
[RISCV] Rename some Feature* to Tune* #117966
wangpc-pp
merged 1 commit into
llvm:main
from
wangpc-pp:main-riscv-rename-feature-to-tune
Nov 28, 2024
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
These features should be tune features.
@llvm/pr-subscribers-backend-risc-v Author: Pengcheng Wang (wangpc-pp) ChangesThese features should be tune features. Full diff: https://github.com/llvm/llvm-project/pull/117966.diff 3 Files Affected:
diff --git a/llvm/lib/Target/RISCV/RISCVFeatures.td b/llvm/lib/Target/RISCV/RISCVFeatures.td
index 7f0bdf362357c7..3fb76c77e32fd7 100644
--- a/llvm/lib/Target/RISCV/RISCVFeatures.td
+++ b/llvm/lib/Target/RISCV/RISCVFeatures.td
@@ -1388,10 +1388,10 @@ def FeatureUnalignedVectorMem
"true", "Has reasonably performant unaligned vector "
"loads and stores">;
-def FeaturePostRAScheduler : SubtargetFeature<"use-postra-scheduler",
+def TunePostRAScheduler : SubtargetFeature<"use-postra-scheduler",
"UsePostRAScheduler", "true", "Schedule again after register allocation">;
-def FeaturePredictableSelectIsExpensive
+def TunePredictableSelectIsExpensive
: SubtargetFeature<"predictable-select-expensive", "PredictableSelectIsExpensive", "true",
"Prefer likely predicted branches over selects">;
diff --git a/llvm/lib/Target/RISCV/RISCVProcessors.td b/llvm/lib/Target/RISCV/RISCVProcessors.td
index 145af4ea80f6d6..471f051728e99f 100644
--- a/llvm/lib/Target/RISCV/RISCVProcessors.td
+++ b/llvm/lib/Target/RISCV/RISCVProcessors.td
@@ -95,7 +95,7 @@ def ROCKET : RISCVTuneProcessorModel<"rocket",
defvar SiFive7TuneFeatures = [TuneSiFive7, TuneNoDefaultUnroll,
TuneShortForwardBranchOpt,
- FeaturePostRAScheduler];
+ TunePostRAScheduler];
def SIFIVE_7 : RISCVTuneProcessorModel<"sifive-7-series",
SiFive7Model, SiFive7TuneFeatures>;
@@ -251,7 +251,7 @@ defvar SiFiveP400TuneFeatures = [TuneNoDefaultUnroll,
TuneConditionalCompressedMoveFusion,
TuneLUIADDIFusion,
TuneAUIPCADDIFusion,
- FeaturePostRAScheduler];
+ TunePostRAScheduler];
def SIFIVE_P450 : RISCVProcessorModel<"sifive-p450", SiFiveP400Model,
!listconcat(RVA22U64Features,
@@ -300,7 +300,7 @@ def SIFIVE_P670 : RISCVProcessorModel<"sifive-p670", SiFiveP600Model,
TuneAUIPCADDIFusion,
TuneNoSinkSplatOperands,
TuneVXRMPipelineFlush,
- FeaturePostRAScheduler]>;
+ TunePostRAScheduler]>;
def SYNTACORE_SCR1_BASE : RISCVProcessorModel<"syntacore-scr1-base",
SyntacoreSCR1Model,
@@ -329,7 +329,7 @@ def SYNTACORE_SCR3_RV32 : RISCVProcessorModel<"syntacore-scr3-rv32",
FeatureStdExtZifencei,
FeatureStdExtM,
FeatureStdExtC],
- [TuneNoDefaultUnroll, FeaturePostRAScheduler]>;
+ [TuneNoDefaultUnroll, TunePostRAScheduler]>;
def SYNTACORE_SCR3_RV64 : RISCVProcessorModel<"syntacore-scr3-rv64",
SyntacoreSCR3RV64Model,
@@ -340,7 +340,7 @@ def SYNTACORE_SCR3_RV64 : RISCVProcessorModel<"syntacore-scr3-rv64",
FeatureStdExtM,
FeatureStdExtA,
FeatureStdExtC],
- [TuneNoDefaultUnroll, FeaturePostRAScheduler]>;
+ [TuneNoDefaultUnroll, TunePostRAScheduler]>;
def SYNTACORE_SCR4_RV32 : RISCVProcessorModel<"syntacore-scr4-rv32",
SyntacoreSCR4RV32Model,
@@ -352,7 +352,7 @@ def SYNTACORE_SCR4_RV32 : RISCVProcessorModel<"syntacore-scr4-rv32",
FeatureStdExtF,
FeatureStdExtD,
FeatureStdExtC],
- [TuneNoDefaultUnroll, FeaturePostRAScheduler]>;
+ [TuneNoDefaultUnroll, TunePostRAScheduler]>;
def SYNTACORE_SCR4_RV64 : RISCVProcessorModel<"syntacore-scr4-rv64",
SyntacoreSCR4RV64Model,
@@ -365,7 +365,7 @@ def SYNTACORE_SCR4_RV64 : RISCVProcessorModel<"syntacore-scr4-rv64",
FeatureStdExtF,
FeatureStdExtD,
FeatureStdExtC],
- [TuneNoDefaultUnroll, FeaturePostRAScheduler]>;
+ [TuneNoDefaultUnroll, TunePostRAScheduler]>;
def SYNTACORE_SCR5_RV32 : RISCVProcessorModel<"syntacore-scr5-rv32",
SyntacoreSCR5RV32Model,
@@ -378,7 +378,7 @@ def SYNTACORE_SCR5_RV32 : RISCVProcessorModel<"syntacore-scr5-rv32",
FeatureStdExtF,
FeatureStdExtD,
FeatureStdExtC],
- [TuneNoDefaultUnroll, FeaturePostRAScheduler]>;
+ [TuneNoDefaultUnroll, TunePostRAScheduler]>;
def SYNTACORE_SCR5_RV64 : RISCVProcessorModel<"syntacore-scr5-rv64",
SyntacoreSCR5RV64Model,
@@ -391,7 +391,7 @@ def SYNTACORE_SCR5_RV64 : RISCVProcessorModel<"syntacore-scr5-rv64",
FeatureStdExtF,
FeatureStdExtD,
FeatureStdExtC],
- [TuneNoDefaultUnroll, FeaturePostRAScheduler]>;
+ [TuneNoDefaultUnroll, TunePostRAScheduler]>;
def SYNTACORE_SCR7 : RISCVProcessorModel<"syntacore-scr7",
SyntacoreSCR7Model,
@@ -410,7 +410,7 @@ def SYNTACORE_SCR7 : RISCVProcessorModel<"syntacore-scr7",
FeatureStdExtZbc,
FeatureStdExtZbs,
FeatureStdExtZkn],
- [TuneNoDefaultUnroll, FeaturePostRAScheduler]>;
+ [TuneNoDefaultUnroll, TunePostRAScheduler]>;
def TENSTORRENT_ASCALON_D8 : RISCVProcessorModel<"tt-ascalon-d8",
NoSchedModel,
@@ -432,7 +432,7 @@ def TENSTORRENT_ASCALON_D8 : RISCVProcessorModel<"tt-ascalon-d8",
FeatureUnalignedVectorMem]),
[TuneNoDefaultUnroll,
TuneOptimizedZeroStrideLoad,
- FeaturePostRAScheduler]>;
+ TunePostRAScheduler]>;
def VENTANA_VEYRON_V1 : RISCVProcessorModel<"veyron-v1",
NoSchedModel,
diff --git a/llvm/test/CodeGen/RISCV/convert-highly-predictable-select-to-branch.ll b/llvm/test/CodeGen/RISCV/convert-highly-predictable-select-to-branch.ll
index 1abd774d7a4874..87c666399e03c1 100644
--- a/llvm/test/CodeGen/RISCV/convert-highly-predictable-select-to-branch.ll
+++ b/llvm/test/CodeGen/RISCV/convert-highly-predictable-select-to-branch.ll
@@ -19,7 +19,7 @@ entry:
}
; Test has highly predictable select according to profile data,
-; which should be transformed to a branch on cores with enabled FeaturePredictableSelectIsExpensive
+; which should be transformed to a branch on cores with enabled TunePredictableSelectIsExpensive
define i32 @test2(i32 %a) {
; CHEAP-LABEL: test2:
; CHEAP: # %bb.0: # %entry
|
topperc
approved these changes
Nov 28, 2024
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
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.
These features should be tune features.