]> granicus.if.org Git - llvm/commit
[MachinePiepliner] Don't check boundary node in checkValidNodeOrder
authorJinsong Ji <jji@us.ibm.com>
Thu, 13 Jun 2019 21:51:12 +0000 (21:51 +0000)
committerJinsong Ji <jji@us.ibm.com>
Thu, 13 Jun 2019 21:51:12 +0000 (21:51 +0000)
commit714e2a9c2b36ad9cf7a44cb601d94570525881f4
treeaa6ebcbabdca7e745c589c5accd95918f62faa1e
parenteb1d34aaa70111dbcfb2d00a38854a78d7339d34
[MachinePiepliner] Don't check boundary node in checkValidNodeOrder

This was exposed by PowerPC target enablement.

In ScheduleDAG, if we haven't seen any uses in this scheduling region,
we will create a dependence edge to ExitSU to model the live-out latency.
This is required for vreg defs with no in-region use, and prefetches with
no vreg def.

When we build NodeOrder in Scheduler, we ignore these boundary nodes.
However, when we check Succs in checkValidNodeOrder, we did not skip
them, so we still assume all the nodes have been sorted and in order in
Indices array. So when we call lower_bound() for ExitSU, it will return
Indices.end(), causing memory issues in following Node access.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363329 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachinePipeliner.cpp
test/CodeGen/PowerPC/sms-simple.ll [new file with mode: 0644]