[RegAllocGreedy] New hook regClassPriorityTrumpsGlobalness
authorJay Foad <jay.foad@amd.com>
Wed, 4 May 2022 15:33:32 +0000 (16:33 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 17 May 2022 11:35:21 +0000 (12:35 +0100)
commit77480556c41fbca36b918323c69cb77f8e02b56c
tree2eea95e5612a0da350b2ea7152e094dceb3ad592
parent9e469ced42cd9335baffd906bed17fd81ce4e6e8
[RegAllocGreedy] New hook regClassPriorityTrumpsGlobalness

Add a new TargetRegisterInfo hook to allow targets to tweak the
priority of live ranges, so that AllocationPriority of the register
class will be treated as more important than whether the range is local
to a basic block or global. This is determined per-MachineFunction.

Differential Revision: https://reviews.llvm.org/D125102
llvm/include/llvm/CodeGen/TargetRegisterInfo.h
llvm/include/llvm/Target/Target.td
llvm/lib/CodeGen/RegAllocGreedy.cpp
llvm/lib/CodeGen/RegAllocGreedy.h
llvm/test/CodeGen/AMDGPU/greedy-liverange-priority.mir [new file with mode: 0644]