]> granicus.if.org Git - llvm/commit
[ScheduleDAG] When a node is cloned, add an edge between the nodes.
authorEli Friedman <efriedma@quicinc.com>
Fri, 4 Oct 2019 19:51:40 +0000 (19:51 +0000)
committerEli Friedman <efriedma@quicinc.com>
Fri, 4 Oct 2019 19:51:40 +0000 (19:51 +0000)
commit71efcdf2ccf360d1ddb7cbf5eef2e6b22d9251b6
treeb0cff6f62d2331a6a12f8147f9061ac2e7f769d1
parentd3bb50102132eb325356f59d9c3500414c21594c
[ScheduleDAG] When a node is cloned, add an edge between the nodes.

InstrEmitter's virtual register handling assumes that clones are emitted
after the cloned node.  Make sure this assumption actually holds.

Fixes a "Node emitted out of order - early" assertion on the testcase.

This is probably a very rare case to actually hit in practice; even
without the explicit edge, the scheduler will usually end up scheduling
the nodes in the expected order due to other constraints.

Differential Revision: https://reviews.llvm.org/D68068

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373782 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
test/CodeGen/Thumb/scheduler-clone-cpsr-def.ll [new file with mode: 0644]