[Pipeliner] Several node-ordering fixes
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 26 Mar 2018 17:07:41 +0000 (17:07 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 26 Mar 2018 17:07:41 +0000 (17:07 +0000)
commit3ca233414b8273f57d1512eddce16115f85b0db7
tree1bd3e56109137e864f217b9a878a9047558b8e12
parent7116e8963df0f3507b86c36953b22d4958b299f1
[Pipeliner] Several node-ordering fixes

First, we change the heuristic that is used to ignore the recurrent
node-sets in the node ordering. In certain cases it's not important
to focus on the recurrent node-sets.  Instead, the algorithm begins
by considering all the instructions in the node ordering step.

Second, a minor change to the bottom up traversal, which needs to
consider loop carried dependences (modeled as anti dependences).
Previously, these instructions were skipped, which caused problems
because the instruction ends up having both predecessors and
sucessors in the schedule.

Third, consider anti-dependences as a tie breaker when choosing
between instructions in the node ordering. We want to make sure
that the source of the anti-dependence does not end up with both
predecesssors and sucessors in the final node ordering.

Patch by Brendon Cahoon.

llvm-svn: 328554
llvm/lib/CodeGen/MachinePipeliner.cpp