mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Tablegen'd regpressure: emit the weighted pressure limit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154477 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aa744e2c44
commit
680363b5fd
@ -152,7 +152,13 @@ EmitRegUnitPressure(raw_ostream &OS, const CodeGenRegBank &RegBank,
|
|||||||
<< "getRegPressureSetLimit(unsigned Idx) const {\n"
|
<< "getRegPressureSetLimit(unsigned Idx) const {\n"
|
||||||
<< " static const unsigned PressureLimitTable[] = {\n";
|
<< " static const unsigned PressureLimitTable[] = {\n";
|
||||||
for (unsigned i = 0; i < NumSets; ++i ) {
|
for (unsigned i = 0; i < NumSets; ++i ) {
|
||||||
OS << " " << RegBank.getRegPressureSet(i).Units.size()
|
const RegUnitSet &RegUnits = RegBank.getRegPressureSet(i);
|
||||||
|
unsigned Weight = 0;
|
||||||
|
for (RegUnitSet::iterator
|
||||||
|
I = RegUnits.Units.begin(), E = RegUnits.Units.end(); I != E; ++I) {
|
||||||
|
Weight += RegBank.getRegUnitWeight(*I);
|
||||||
|
}
|
||||||
|
OS << " " << Weight
|
||||||
<< ", \t// " << i << ": " << RegBank.getRegPressureSet(i).Name << "\n";
|
<< ", \t// " << i << ": " << RegBank.getRegPressureSet(i).Name << "\n";
|
||||||
}
|
}
|
||||||
OS << " 0 };\n"
|
OS << " 0 };\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user