Adjust MachineScheduler to use ProcResource counts
authorMomchil Velikov <momchil.velikov@arm.com>
Fri, 10 May 2019 16:54:32 +0000 (16:54 +0000)
committerMomchil Velikov <momchil.velikov@arm.com>
Fri, 10 May 2019 16:54:32 +0000 (16:54 +0000)
commitc396f09ce96e56260cc7d5d3398615904b473265
treef2334f10b3a0b77d693c970b7b65b6d648bb200a
parent61504079515f76ca094bb836c4d53b41064220d6
Adjust MachineScheduler to use ProcResource counts

This fix allows the scheduler to take into account the number of instances of
each ProcResource specified. Previously a declaration in a scheduler of
ProcResource<1> would be treated identically to a declaration of
ProcResource<2>. Now the hazard recognizer would report a hazard only after all
of the resource instances are busy.

Patch by Jackson Woodruff and Momchil Velikov.

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

llvm-svn: 360441
llvm/include/llvm/CodeGen/MachineScheduler.h
llvm/lib/CodeGen/MachineScheduler.cpp
llvm/test/CodeGen/AArch64/misched-fusion-aes.ll
llvm/test/CodeGen/ARM/proc-resource-sched.ll [new file with mode: 0644]