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)
commit499cac486acad9eb87b06e74e03ca3c5808ead3e
tree16dd84d0cbb1fdfd7d007d0c8b15ab9e2d582eeb
parent4d8686cc425d0fdb1b3a2a093e5979617c3277b5
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.

llvm-svn: 169154
llvm/include/llvm/Target/TargetRegisterInfo.h
llvm/lib/CodeGen/TargetRegisterInfo.cpp