[Hexagon] HexagonMachineScheduler should account for resources
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 18 Jul 2016 14:52:13 +0000 (14:52 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Mon, 18 Jul 2016 14:52:13 +0000 (14:52 +0000)
commit3467e9d0a93db2d0a997168d2231d6860b010784
treeeafeb1133dfa780f2a2560db262bf0b5dab94a25
parentab1b926bb9033018ace8d1dbe780ac954659a94b
[Hexagon] HexagonMachineScheduler should account for resources

The machine scheduler needs to account for available resources
more accurately in order to avoid scheduling an instruction that
forces a new packet to be created.

This occurs in two ways: First, an instruction without an available
resource may have a large priority due to other metrics and be
scheduled when there are other instructions with available resources.
Second, an instruction with a non-zero latency may become available
prematurely. In both these cases, we attempt change the priority
in order to allow a better instruction to be scheduled.

Patch by Brendon Cahoon.

llvm-svn: 275793
llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp
llvm/test/CodeGen/Hexagon/eliminate-pred-spill.ll