[PATCH] D101601: [SelectionDAG] Make fast and linearize visible by clang -pre-RA-sched

Pengfei Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 6 21:26:13 PDT 2021


pengfei added inline comments.


================
Comment at: clang/test/CodeGen/pre-ra-sched.c:1
+// RUN: %clang %s -mllvm -pre-RA-sched=fast -c -o - | FileCheck %s
+// RUN: %clang %s -mllvm -pre-RA-sched=linearize -c -o - | FileCheck %s
----------------
Should we add test under llvm/test? A bit strange that changing LLVM code while adding test in clang/test.


================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:105
+  Fast,        // Fast suboptimal list scheduling
+  Linearize,   // Linearize DAG, no scheduling
+};
----------------
This comma should be removed.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:273-276
+    if (TLI->getSchedulingPreference() == Sched::Fast)
+      return createFastDAGScheduler(IS, OptLevel);
+    if (TLI->getSchedulingPreference() == Sched::Linearize)
+      return createDAGLinearizer(IS, OptLevel);
----------------
I saw they are always registered in ScheduleDAGFast.cpp:
https://github.com/llvm/llvm-project/blob/main/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp#L36
Why do we register them again here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101601/new/

https://reviews.llvm.org/D101601



More information about the cfe-commits mailing list