From d5fa8fb1061e66be9488b4054e9ee9d41380c6ec Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 31 Mar 2015 20:52:25 +0000 Subject: [PATCH] Fix AllocationPriority not getting set for derived register classes. llvm-svn: 233752 --- llvm/utils/TableGen/CodeGenRegisters.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp index 7179611f0127..e36066adf7aa 100644 --- a/llvm/utils/TableGen/CodeGenRegisters.cpp +++ b/llvm/utils/TableGen/CodeGenRegisters.cpp @@ -730,7 +730,8 @@ CodeGenRegisterClass::CodeGenRegisterClass(CodeGenRegBank &RegBank, SpillSize(Props.SpillSize), SpillAlignment(Props.SpillAlignment), CopyCost(0), - Allocatable(true) { + Allocatable(true), + AllocationPriority(0) { for (const auto R : Members) TopoSigs.set(R->getTopoSig()); } @@ -750,6 +751,7 @@ void CodeGenRegisterClass::inheritProperties(CodeGenRegBank &RegBank) { CopyCost = Super.CopyCost; Allocatable = Super.Allocatable; AltOrderSelect = Super.AltOrderSelect; + AllocationPriority = Super.AllocationPriority; // Copy all allocation orders, filter out foreign registers from the larger // super-class.