Skip to content

Commit 8a245cd

Browse files
committed
[RISCV] Add a generic OOO CPU
We add a generic out-of-order CPU model here just like what GCC has done. People may use this model to evaluate some optimizations, and more importantly, people can use this model as a template to customize their own CPU model. The design (units, cycles, ...) of this model is random so don't take it seriously.
1 parent f035351 commit 8a245cd

File tree

6 files changed

+2091
-1
lines changed

6 files changed

+2091
-1
lines changed

llvm/lib/Target/RISCV/RISCV.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ include "RISCVMacroFusion.td"
4545
//===----------------------------------------------------------------------===//
4646
// RISC-V Scheduling Models
4747
//===----------------------------------------------------------------------===//
48-
48+
include "RISCVSchedGenericOOO.td"
4949
include "RISCVSchedMIPSP8700.td"
5050
include "RISCVSchedRocket.td"
5151
include "RISCVSchedSiFive7.td"

llvm/lib/Target/RISCV/RISCVProcessors.td

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def GENERIC_RV64 : RISCVProcessorModel<"generic-rv64",
103103
// Support generic for compatibility with other targets. The triple will be used
104104
// to change to the appropriate rv32/rv64 version.
105105
def GENERIC : RISCVTuneProcessorModel<"generic", NoSchedModel>, GenericTuneInfo;
106+
def GENERIC_OOO : RISCVTuneProcessorModel<"generic-ooo", GenericOOOModel>,
107+
GenericTuneInfo;
106108

107109
def MIPS_P8700 : RISCVProcessorModel<"mips-p8700",
108110
MIPSP8700Model,

0 commit comments

Comments
 (0)