[llvm] [RISCV] Add load/store clustering in post machine schedule (PR #111504)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 16 01:06:45 PDT 2024


================
@@ -363,6 +363,19 @@ class RISCVPassConfig : public TargetPassConfig {
     return DAG;
   }
 
+  ScheduleDAGInstrs *
+  createPostMachineScheduler(MachineSchedContext *C) const override {
+    ScheduleDAGMI *DAG = nullptr;
+    if (EnableMISchedLoadStoreClustering) {
----------------
wangpc-pp wrote:

Can we add a new debug option to control if we should enable postra clustering?
```
static cl::opt<bool> EnablePostMISchedLoadStoreClustering(
    "riscv-postmisched-load-store-clustering", cl::Hidden,
    cl::desc("Enable PostRA load and store clustering in the machine scheduler"),
    cl::init(true));

if (EnableMISchedLoadStoreClustering && EnablePostMISchedLoadStoreClustering) {
   ...
}
```

https://github.com/llvm/llvm-project/pull/111504


More information about the llvm-commits mailing list