Skip to content

[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 1 commit into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions llvm/lib/Target/RISCV/RISCV.td
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ include "RISCVMacroFusion.td"
// RISC-V Scheduling Models
//===----------------------------------------------------------------------===//

include "RISCVSchedGeneric.td"
include "RISCVSchedMIPSP8700.td"
include "RISCVSchedRocket.td"
include "RISCVSchedSiFive7.td"
Expand Down
9 changes: 0 additions & 9 deletions llvm/lib/Target/RISCV/RISCVProcessors.td
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 18 additions & 0 deletions llvm/lib/Target/RISCV/RISCVSchedGeneric.td
Original file line number Diff line number Diff line change
@@ -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;
}