mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Add TargetRegisterInfo::getRawAllocationOrder().
This virtual function will replace allocation_order_begin/end as the one to override when implementing custom allocation orders. It is simpler to have one function return an ArrayRef than having two virtual functions computing different ends of the same array. Use getRawAllocationOrder() in place of allocation_order_begin() where it makes sense, but leave some clients that look like they really want the filtered allocation orders from RegisterClassInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133170 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -434,8 +434,7 @@ namespace llvm {
|
||||
rcEnd = tri->regclass_end();
|
||||
rcItr != rcEnd; ++rcItr) {
|
||||
const TargetRegisterClass *trc = *rcItr;
|
||||
unsigned capacity = std::distance(trc->allocation_order_begin(*mf),
|
||||
trc->allocation_order_end(*mf));
|
||||
unsigned capacity = trc->getRawAllocationOrder(*mf).size();
|
||||
|
||||
if (capacity != 0)
|
||||
capacityMap[trc] = capacity;
|
||||
@ -482,8 +481,7 @@ namespace llvm {
|
||||
rcItr != rcEnd; ++rcItr) {
|
||||
const TargetRegisterClass *trc = *rcItr;
|
||||
|
||||
if (trc->allocation_order_begin(*mf) ==
|
||||
trc->allocation_order_end(*mf))
|
||||
if (trc->getRawAllocationOrder(*mf).empty())
|
||||
continue;
|
||||
|
||||
unsigned worstAtI = getWorst(li->reg, trc);
|
||||
|
Reference in New Issue
Block a user