[PATCH] D42051: [ARM] Allow the scheduler to clone a node with glue to avoid a copy CPSR ↔ GPR.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 18 16:30:09 PST 2018


efriedma added subscribers: zvi, RKSimon, craig.topper.
efriedma added a comment.

This approach seems okay.  I mean, worst-case, you're causing an O(N^2) explosion in codesize, but it triggers very rarely in practice.

(Adding some x86 reviewers; you might want to use this hook to avoid generating pushf/popf.)



================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1136
+    if (VT == MVT::Glue) {
+      llvm::errs() << "Giving up because it has outgoing glue\n";
       return nullptr;
----------------
errs()?


================
Comment at: lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp:1144
+    if (VT == MVT::Glue
+            && !TII->canCopyGluedNodeDuringSchedule(N)) {
+      DEBUG(dbgs() << "Giving up because it one of the operands is glue and "
----------------
Maybe clang-format this?


https://reviews.llvm.org/D42051





More information about the llvm-commits mailing list