[PATCH] D90144: [Scheduling] Fall back to the fast cluster algorithm if the DAG is too complex

Owen Anderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 09:59:12 PDT 2020


resistor added a comment.

Did the concept of using the static DAG not work?



================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1586
 // call target hook to see if they can cluster.
+// If FastCluster is enabled, we assume that, all the loads/stores have be
+// preprocessed and now, they didn't have dependency with each other.
----------------
s/be/been/


================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1587
+// If FastCluster is enabled, we assume that, all the loads/stores have be
+// preprocessed and now, they didn't have dependency with each other.
 void BaseMemOpClusterMutation::clusterNeighboringMemOps(
----------------
"they don't have dependencies on each other"


================
Comment at: llvm/lib/CodeGen/MachineScheduler.cpp:1708
+      ForceFastCluster ||
+      MemOps.size() * DAG->SUnits.size() / 1000000 > FastClusterThreshold;
+  for (auto &MemOp : MemOps) {
----------------
This threshold happens to work for the testcase in question, but my gut tells me that the threshold should be substantially lower than this.  It might make sense to generate some artificial test cases and measure how big of a cluster is needed to make compile time explode.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90144



More information about the llvm-commits mailing list