Add a new hook for providing register allocator hints more flexibly.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 3 Dec 2012 21:17:00 +0000 (21:17 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 3 Dec 2012 21:17:00 +0000 (21:17 +0000)
commit7eafc3e7be067709c6fcdae7b7fc4994c7ec2377
tree9ada9cd8413e8cf7244500625416ae1565b9fd53
parentb434a8130f6094b5580010dc0c746bf1a5007b10
Add a new hook for providing register allocator hints more flexibly.

The TargetRegisterInfo::getRegAllocationHints() function is going to
replace the existing mechanisms for providing target-dependent hints to
the register allocator: ResolveRegAllocHint() and
getRawAllocationOrder().

The new hook is more flexible because it allows the target to provide
multiple preferred candidate registers for each virtual register, and it
is easier to use because targets are not required to return a reference
to a constant array like getRawAllocationOrder().

An optional VirtRegMap argument can be used to provide target-dependent
hints that depend on the provisional assignments of other virtual
registers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169154 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetRegisterInfo.h
lib/CodeGen/TargetRegisterInfo.cpp