mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
RegAllocGreedy: Allow target to specify register class ordering.
Specify an allocation order with a register class. This is used by register allocators with a greedy heuristic. This is usefull as it is sometimes beneficial to color more constrained classes first. Differential Revision: http://reviews.llvm.org/D8626 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -711,6 +711,10 @@ CodeGenRegisterClass::CodeGenRegisterClass(CodeGenRegBank &RegBank, Record *R)
|
||||
CopyCost = R->getValueAsInt("CopyCost");
|
||||
Allocatable = R->getValueAsBit("isAllocatable");
|
||||
AltOrderSelect = R->getValueAsString("AltOrderSelect");
|
||||
int AllocationPriority = R->getValueAsInt("AllocationPriority");
|
||||
if (AllocationPriority < 0 || AllocationPriority > 63)
|
||||
PrintFatalError(R->getLoc(), "AllocationPriority out of range [0,63]");
|
||||
this->AllocationPriority = AllocationPriority;
|
||||
}
|
||||
|
||||
// Create an inferred register class that was missing from the .td files.
|
||||
|
Reference in New Issue
Block a user