Skip to content

Commit 69f9138

Browse files
authored
[RISCV] Add a new subtarget feature for throttled FP64 vector performance (#162399)
sifive-x390 and sifive-x280 both share the SiFIve7 scheduling model, yet the former has a limited FP64 vector performance. Right now we account for it by instantiating two separate scheduling models (throttled v.s. non-throttled) from the base SiFive7 model. However, this approach (which is also used in other performance features like fast vrgather in SiFive7) does not scale if we add more of these performance features in the future -- the number of scheduling models will simply become unmanageable. The new solution I've been working on is to let a _single_ scheduling model be configured by subtarget features on performance features like these, such that we no longer need to create those derived models. This patch creates the subtarget feature that'll ultimately replace the `isFP64Throttled` knob in SiFive7 scheduling model mentioned earlier. There will be a follow-up patch to integrate this into the scheduling model.
1 parent 7a391e3 commit 69f9138

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

llvm/lib/Target/RISCV/RISCVFeatures.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,6 +1823,11 @@ def TuneConditionalCompressedMoveFusion
18231823
def HasConditionalMoveFusion : Predicate<"Subtarget->hasConditionalMoveFusion()">;
18241824
def NoConditionalMoveFusion : Predicate<"!Subtarget->hasConditionalMoveFusion()">;
18251825

1826+
def TuneHasSingleElementVecFP64
1827+
: SubtargetFeature<"single-element-vec-fp64", "HasSingleElementVectorFP64", "true",
1828+
"Certain vector FP64 operations produce a single result "
1829+
"element per cycle">;
1830+
18261831
def TuneMIPSP8700
18271832
: SubtargetFeature<"mips-p8700", "RISCVProcFamily", "MIPSP8700",
18281833
"MIPS p8700 processor">;

llvm/test/CodeGen/RISCV/features-info.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@
142142
; CHECK-NEXT: shvstvecd - 'Shvstvecd' (vstvec supports Direct mode).
143143
; CHECK-NEXT: shxadd-load-fusion - Enable SH(1|2|3)ADD(.UW) + load macrofusion.
144144
; CHECK-NEXT: sifive7 - SiFive 7-Series processors.
145+
; CHECK-NEXT: single-element-vec-fp64 - Certain vector FP64 operations produce a single result element per cycle.
145146
; CHECK-NEXT: smaia - 'Smaia' (Advanced Interrupt Architecture Machine Level).
146147
; CHECK-NEXT: smcdeleg - 'Smcdeleg' (Counter Delegation Machine Level).
147148
; CHECK-NEXT: smcntrpmf - 'Smcntrpmf' (Cycle and Instret Privilege Mode Filtering).

0 commit comments

Comments
 (0)