[PATCH] D24855: MachineScheduler: Enable macro fusion in post-RA scheduler

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 20:40:32 PDT 2016


MatzeB added a comment.

In https://reviews.llvm.org/D24855#572492, @atrick wrote:

> Doesn't this force macro fusion for all targets/subtargets? If we wanted to do that, we wouldn't need the cluster edge and scheduler heuristic anymore. Shouldn't there be a TII->forceMacroFusion() option?


If the target doesn't implement TII::shouldScheduleAdjacent() then no fusion will happen. Of course this commit forces fusion to be respected even in the presence of possible stalls in the scheduling model. This is a switch of priorities and indeed does not allow you any more to insert the macrofusion check at any place in the heuristic (the scheduling model/stalls aren't part of that heuristic either so I couldn't just move the cluster edge heuristic to an earlier place in tryCandidate() so I went this route).

Do you think a TII->forceMacroFusion() hook is necessary? Currently the only targets implementing shouldScheduleAdjacent() are X86 and AArch64 and they should both prefer fusion over reported stalls, making the cluster/weak solution untested/dead code.


Repository:
  rL LLVM

https://reviews.llvm.org/D24855





More information about the llvm-commits mailing list