[MachineScheduler] checkResourceLimit boundary condition update
authorJinsong Ji <jji@us.ibm.com>
Fri, 7 Jun 2019 14:54:47 +0000 (14:54 +0000)
committerJinsong Ji <jji@us.ibm.com>
Fri, 7 Jun 2019 14:54:47 +0000 (14:54 +0000)
commit7aafdef62711c4da98a622658152aaed43d49696
treedef025953526fdee965133c90fa061833e9d2a62
parent088410ffc6b82be18344e278f5136f501948bc3b
[MachineScheduler] checkResourceLimit boundary condition update

When we call checkResourceLimit in bumpCycle or bumpNode, and we
know the resource count has just reached the limit (the equations
 are equal). We should return true to mark that we are resource
limited for next schedule, or else we might continue to schedule
in favor of latency for 1 more schedule and create a schedule that
 actually overbook the resource.

When we call checkResourceLimit to estimate the resource limite before
scheduling, we don't need to return true even if the equations are
equal, as it shouldn't limit the schedule for it .

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

llvm-svn: 362805
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/test/CodeGen/PowerPC/build-vector-tests.ll
llvm/test/CodeGen/PowerPC/csr-save-restore-order.ll
llvm/test/CodeGen/PowerPC/f128-passByValue.ll
llvm/test/CodeGen/PowerPC/vec_conv_fp_to_i_8byte_elts.ll
llvm/test/CodeGen/PowerPC/vec_conv_i_to_fp_8byte_elts.ll