[MachineScheduler] Update available queue on the first mop of a new cycle
authorDavid Green <david.green@arm.com>
Tue, 9 Jun 2020 16:35:45 +0000 (17:35 +0100)
committerDavid Green <david.green@arm.com>
Tue, 9 Jun 2020 18:13:53 +0000 (19:13 +0100)
commit2fea3fe41c5a177d019dd99fb1b43d767eccde24
tree14f50008cd93f22cdc4e2ca5cd631526a02d9aef
parent6bb93e3dd0e28dafe6d3ddb700d2036d00b323aa
[MachineScheduler] Update available queue on the first mop of a new cycle

If a resource can be held for multiple cycles in the schedule model
then an instruction can be placed into the available queue, another
instruction can be scheduled, but the first will not be taken back out if
the two instructions hazard. To fix this make sure that we update the
available queue even on the first MOp of a cycle, pushing available
instructions back into the pending queue if they now conflict.

This happens with some downstream schedules we have around MVE
instruction scheduling where we use ResourceCycles=[2] to show the
instruction executing over two beats. Apparently the test changes here
are OK too.

Differential Revision: https://reviews.llvm.org/D76909
15 files changed:
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/test/CodeGen/AArch64/misched-fusion-aes.ll
llvm/test/CodeGen/PowerPC/2007-01-15-AsmDialect.ll
llvm/test/CodeGen/PowerPC/2008-10-28-f128-i32.ll
llvm/test/CodeGen/PowerPC/aix-cc-abi.ll
llvm/test/CodeGen/PowerPC/aix32-cc-abi-vaarg.ll
llvm/test/CodeGen/PowerPC/fp128-bitcast-after-operation.ll
llvm/test/CodeGen/PowerPC/inc-of-add.ll
llvm/test/CodeGen/PowerPC/ppc32-skip-regs.ll
llvm/test/CodeGen/PowerPC/ppcf128-constrained-fp-intrinsics.ll
llvm/test/CodeGen/PowerPC/pr43976.ll
llvm/test/CodeGen/PowerPC/spe.ll
llvm/test/CodeGen/PowerPC/sub-of-not.ll
llvm/test/CodeGen/PowerPC/umulo-128-legalisation-lowering.ll
llvm/test/CodeGen/PowerPC/vec_splat.ll