mirror of
https://github.com/RPCSX/llvm.git
synced 2025-04-02 16:21:36 +00:00
Also compute TopoSigs in synthetic register classes.
CodeGenRegisterClass has two constructors. Both need to compute the TopoSigs BitVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157271 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
49317e2df3
commit
a9fdbbc55f
@ -764,15 +764,20 @@ CodeGenRegisterClass::CodeGenRegisterClass(CodeGenRegBank &RegBank, Record *R)
|
||||
// Create an inferred register class that was missing from the .td files.
|
||||
// Most properties will be inherited from the closest super-class after the
|
||||
// class structure has been computed.
|
||||
CodeGenRegisterClass::CodeGenRegisterClass(StringRef Name, Key Props)
|
||||
CodeGenRegisterClass::CodeGenRegisterClass(CodeGenRegBank &RegBank,
|
||||
StringRef Name, Key Props)
|
||||
: Members(*Props.Members),
|
||||
TheDef(0),
|
||||
Name(Name),
|
||||
TopoSigs(RegBank.getNumTopoSigs()),
|
||||
EnumValue(-1),
|
||||
SpillSize(Props.SpillSize),
|
||||
SpillAlignment(Props.SpillAlignment),
|
||||
CopyCost(0),
|
||||
Allocatable(true) {
|
||||
for (CodeGenRegister::Set::iterator I = Members.begin(), E = Members.end();
|
||||
I != E; ++I)
|
||||
TopoSigs.set((*I)->getTopoSig());
|
||||
}
|
||||
|
||||
// Compute inherited propertied for a synthesized register class.
|
||||
@ -1080,7 +1085,7 @@ CodeGenRegBank::getOrCreateSubClass(const CodeGenRegisterClass *RC,
|
||||
return FoundI->second;
|
||||
|
||||
// Sub-class doesn't exist, create a new one.
|
||||
CodeGenRegisterClass *NewRC = new CodeGenRegisterClass(Name, K);
|
||||
CodeGenRegisterClass *NewRC = new CodeGenRegisterClass(*this, Name, K);
|
||||
addToMaps(NewRC);
|
||||
return NewRC;
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ namespace llvm {
|
||||
};
|
||||
|
||||
// Create a non-user defined register class.
|
||||
CodeGenRegisterClass(StringRef Name, Key Props);
|
||||
CodeGenRegisterClass(CodeGenRegBank&, StringRef Name, Key Props);
|
||||
|
||||
// Called by CodeGenRegBank::CodeGenRegBank().
|
||||
static void computeSubClasses(CodeGenRegBank&);
|
||||
|
Loading…
x
Reference in New Issue
Block a user