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

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 18:11:22 PDT 2016

MatzeB updated the summary for this revision.
MatzeB updated this revision to Diff 72937.
MatzeB added a comment.

It turned out the approach taken previously was not enough: Currently nodes predicted to stall will end up in the pending queue and not even get consider in tryCandidate() for the usual heuristics. However a possible stalls should not get in the way of the macrofusion heuristic so instead of adjusting the picking heuristic this patch adds artificial scheduling edges to the roots to enforce the adjacent scheduling.

PS: In some internal discussions we decided that a nice long term solution would be to merge the fusing nodes instead in the preparation step (by creating an instruction bundle and merging the ScheduleDAG nodes). However merging nodes after creating the scheduling DAG turns out to be tricky because the existing code expects a fixed number of SUnits, we would need to update or recompute the topological ordering, etc.  So to get this specific problem under control I found adding edges to root nodes a robust and simpler solution for now.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24855.72937.patch
Type: text/x-patch
Size: 4630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160929/c44af6d7/attachment.bin>

More information about the llvm-commits mailing list