From 1d4a57bd12783ff98faed630e800e2c3675dd4d6 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 28 Oct 2022 10:49:27 -0700 Subject: [PATCH] [RISCV] Merge WriteLDW and WriteLDWU schedule classes. We don't distinquish signed vs unsigned for B and H loads. Maybe this split was because LDWU isn't in RV32I? I don't think that distinction matters to the scheduler. If your processor only supports RV32I then having LWU in the SchedClass doesn't matter. If your target supports RV64I, then LW and LWU are likely the same. --- llvm/lib/Target/RISCV/RISCVInstrInfo.td | 2 +- llvm/lib/Target/RISCV/RISCVSchedRocket.td | 1 - llvm/lib/Target/RISCV/RISCVSchedSiFive7.td | 1 - llvm/lib/Target/RISCV/RISCVSchedule.td | 1 - 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfo.td b/llvm/lib/Target/RISCV/RISCVInstrInfo.td index 12bd105..ebf3113 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfo.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfo.td @@ -740,7 +740,7 @@ def CSRRCI : CSR_ii<0b111, "csrrci">; /// RV64I instructions let Predicates = [IsRV64] in { -def LWU : Load_ri<0b110, "lwu">, Sched<[WriteLDWU, ReadMemBase]>; +def LWU : Load_ri<0b110, "lwu">, Sched<[WriteLDW, ReadMemBase]>; def LD : Load_ri<0b011, "ld">, Sched<[WriteLDD, ReadMemBase]>; def SD : Store_rri<0b011, "sd">, Sched<[WriteSTD, ReadStoreData, ReadMemBase]>; diff --git a/llvm/lib/Target/RISCV/RISCVSchedRocket.td b/llvm/lib/Target/RISCV/RISCVSchedRocket.td index e39585f..ed0e9f2 100644 --- a/llvm/lib/Target/RISCV/RISCVSchedRocket.td +++ b/llvm/lib/Target/RISCV/RISCVSchedRocket.td @@ -93,7 +93,6 @@ def : WriteRes; let Latency = 2 in { def : WriteRes; -def : WriteRes; def : WriteRes; def : WriteRes; def : WriteRes; diff --git a/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td b/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td index 17df9e2..329209f 100644 --- a/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td +++ b/llvm/lib/Target/RISCV/RISCVSchedSiFive7.td @@ -88,7 +88,6 @@ let Latency = 3 in { def : WriteRes; def : WriteRes; def : WriteRes; -def : WriteRes; def : WriteRes; } diff --git a/llvm/lib/Target/RISCV/RISCVSchedule.td b/llvm/lib/Target/RISCV/RISCVSchedule.td index 0437f78..41c74b2 100644 --- a/llvm/lib/Target/RISCV/RISCVSchedule.td +++ b/llvm/lib/Target/RISCV/RISCVSchedule.td @@ -25,7 +25,6 @@ def WriteNop : SchedWrite; def WriteLDB : SchedWrite; // Load byte def WriteLDH : SchedWrite; // Load half-word def WriteLDW : SchedWrite; // Load word -def WriteLDWU : SchedWrite; // Load word unsigned def WriteLDD : SchedWrite; // Load double-word def WriteCSR : SchedWrite; // CSR instructions def WriteSTB : SchedWrite; // Store byte -- 2.7.4