diff options
author | Andrew Trick <atrick@apple.com> | 2012-04-11 04:31:33 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-04-11 04:31:33 +0000 |
commit | 680363b5fdf7ce6e188d4c8c7508fc819061ba6d (patch) | |
tree | af182a0ad92c22229148ec610f52639e31d0d229 /utils/TableGen | |
parent | aa744e2c44b530fc2f7b266fb61f22976cb4ea0f (diff) | |
download | external_llvm-680363b5fdf7ce6e188d4c8c7508fc819061ba6d.zip external_llvm-680363b5fdf7ce6e188d4c8c7508fc819061ba6d.tar.gz external_llvm-680363b5fdf7ce6e188d4c8c7508fc819061ba6d.tar.bz2 |
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
Diffstat (limited to 'utils/TableGen')
-rw-r--r-- | utils/TableGen/RegisterInfoEmitter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index ac89e25..8085955 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -152,7 +152,13 @@ EmitRegUnitPressure(raw_ostream &OS, const CodeGenRegBank &RegBank, << "getRegPressureSetLimit(unsigned Idx) const {\n" << " static const unsigned PressureLimitTable[] = {\n"; 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"; } OS << " 0 };\n" |