[llvm] [MacroFusion] Restricts pairs to have SDep::Data dependency only (PR #203793)

Tomer Shafir via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 04:25:59 PDT 2026


================
@@ -204,8 +204,8 @@ bool MacroFusion::scheduleAdjacentImpl(ScheduleDAGInstrs &DAG, SUnit &AnchorSU)
 
   // Explorer for fusion candidates among the dependencies of the anchor instr.
   for (SDep &Dep : AnchorSU.Preds) {
-    // Ignore dependencies other than data or strong ordering.
-    if (Dep.isWeak() || isHazard(Dep))
+    // Ignore dependencies other than data
+    if (Dep.getKind() != SDep::Data)
----------------
tomershafir wrote:

The other check sites add dependency edges in order to avoid mixing other instructions in between the candidate pair. In this case I think we do want to keep strong order edges, to avoid strong order deps to be mixed in, as could happen if we would only check data deps.

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


More information about the llvm-commits mailing list