aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/AllocationOrder.cpp
AgeCommit message (Collapse)AuthorFilesLines
2011-06-16Rename TRI::getAllocationOrder() to getRawAllocationOrder().Jakob Stoklund Olesen1-10/+8
Also switch the return type to ArrayRef<unsigned> which works out nicely for ARM's implementation of this function because of the clever ArrayRef constructors. The name change indicates that the returned allocation order may contain reserved registers as has been the case for a while. llvm-svn: 133216
2011-06-06Get allocation orders from RegisterClassInfo when possible.Jakob Stoklund Olesen1-22/+34
Only target-dependent hints require callbacks. The RCI allocation order has CSR aliases last according to their order of appearance in the getCalleeSavedRegs list. This can depend on the calling convention. This way, AllocationOrder::next doesn't have to check for reserved registers, and CSRs are always allocated last, even with weird calling conventions. llvm-svn: 132690
2011-06-03Switch AllocationOrder to using RegisterClassInfo instead of a BitVectorJakob Stoklund Olesen1-4/+5
of reserved registers. Use RegisterClassInfo in RABasic as well. This slightly changes som allocation orders because RegisterClassInfo puts CSR aliases last. llvm-svn: 132581
2011-01-10Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.Jakob Stoklund Olesen1-1/+1
These functions not longer assert when passed 0, but simply return false instead. No functional change intended. llvm-svn: 123155
2010-12-10Use AllocationOrder in RegAllocGreedy, fix a bug in the hint calculation.Jakob Stoklund Olesen1-4/+4
llvm-svn: 121584
2010-12-10Add an AllocationOrder class that can iterate over the allocatable physicalJakob Stoklund Olesen1-0/+68
registers for a given virtual register. Reserved registers are filtered from the allocation order, and any valid hint is returned as the first suggestion. For target dependent hints, a number of arcane target hooks are invoked. llvm-svn: 121497