This is an archive of the discontinued LLVM Phabricator instance.

MacroFusion: Fix macro fusion with ExitSU failing in top-down scheduling
ClosedPublic

Authored by MatzeB on Jul 25 2018, 5:39 PM.

Details

Summary

When fusing instructions A and B, we must add all predecessors of B as
predecessors of A to avoid instructions getting scheduling in between.

There is a special case involving ExitSU: Every other node must be
scheduled before it by design and we don't need to make this explicit in
the graph, however when fusing with a different node we need to schedule
every othere node before the fused node too and we need to make this
explicit now: This patch adds a dependency from the fused node to all
roots in the graph.

Diff Detail

Repository
rL LLVM

Event Timeline

MatzeB created this revision.Jul 25 2018, 5:39 PM
MatzeB updated this revision to Diff 157412.Jul 25 2018, 5:47 PM
fhahn accepted this revision.Jul 26 2018, 6:36 AM

LGTM, thanks

This revision is now accepted and ready to land.Jul 26 2018, 6:36 AM

Thank you for this fix.

This revision was automatically updated to reflect the committed changes.