Skip to content

Commit 273ccfc

Browse files
wangpc-ppjoaosaffran
authored and
joaosaffran
committed
[RISCV][NFC] Move GenericModel to standalone file (llvm#127003)
And fix some typos in comments. In the future, we may add more scheduling info to GenericModel.
1 parent da0695a commit 273ccfc

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

llvm/lib/Target/RISCV/RISCV.td

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ include "RISCVMacroFusion.td"
4646
// RISC-V Scheduling Models
4747
//===----------------------------------------------------------------------===//
4848

49+
include "RISCVSchedGeneric.td"
4950
include "RISCVSchedMIPSP8700.td"
5051
include "RISCVSchedRocket.td"
5152
include "RISCVSchedSiFive7.td"

llvm/lib/Target/RISCV/RISCVProcessors.td

-9
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,6 @@ class RISCVTuneProcessorModel<string n,
8888

8989
defvar GenericTuneFeatures = [TuneOptimizedNF2SegmentLoadStore];
9090

91-
// Adjust the default cost model to enable all heuristics, not just latency
92-
// In particular, this enables register pressure heustics which are very
93-
// important for high LMUL vector code, and have little negative impact
94-
// on other configurations,
95-
def GenericModel : SchedMachineModel {
96-
let MicroOpBufferSize = 1;
97-
let CompleteModel = 0;
98-
}
99-
10091
def GENERIC_RV32 : RISCVProcessorModel<"generic-rv32",
10192
GenericModel,
10293
[Feature32Bit,
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//===-- RISCVSchedGeneric.td - Generic In-order Processor --*- tablegen -*-===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
// Adjust the default cost model to enable all scheduling heuristics, not just
10+
// latency.
11+
//
12+
// In particular, this enables register pressure heuristics which are very
13+
// important for vector code with high LMULs, and have little negative impact
14+
// on other configurations.
15+
def GenericModel : SchedMachineModel {
16+
let MicroOpBufferSize = 1;
17+
let CompleteModel = 0;
18+
}

0 commit comments

Comments
 (0)