From c1a9a2897ed48e56705b702d2ea2489d253edd44 Mon Sep 17 00:00:00 2001 From: Reshabh Sharma Date: Sun, 29 May 2022 16:04:59 -0700 Subject: [PATCH] Use HBSched when mcpu is hb-rv32 --- llvm/lib/Target/RISCV/HB32Scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Target/RISCV/HB32Scheduler.cpp b/llvm/lib/Target/RISCV/HB32Scheduler.cpp index 8db198c756f0f0..9c30fdf7718472 100644 --- a/llvm/lib/Target/RISCV/HB32Scheduler.cpp +++ b/llvm/lib/Target/RISCV/HB32Scheduler.cpp @@ -32,7 +32,7 @@ static cl::opt /// Create custom scheduler if HB32Sched is enabled on the command line. ScheduleDAGInstrs *llvm::createHB32Scheduler(MachineSchedContext *C) { - if (HB32Sched) { + if (HB32Sched || C->MF->getSubtarget().getCPU().str() == "hb-rv32") { return new ScheduleDAGMILive(C, std::make_unique(C)); }