forked from OSchip/llvm-project
tablegen: Add a simple heuristic to get better names for pressure sets
Differential Revision: http://reviews.llvm.org/D14597 llvm-svn: 253095
This commit is contained in:
parent
dfe0e99517
commit
167cbd2167
|
@ -1574,6 +1574,12 @@ void CodeGenRegBank::pruneUnitSets() {
|
||||||
&& UnitWeight == RegUnits[SuperSet.Units.back()].Weight) {
|
&& UnitWeight == RegUnits[SuperSet.Units.back()].Weight) {
|
||||||
DEBUG(dbgs() << "UnitSet " << SubIdx << " subsumed by " << SuperIdx
|
DEBUG(dbgs() << "UnitSet " << SubIdx << " subsumed by " << SuperIdx
|
||||||
<< "\n");
|
<< "\n");
|
||||||
|
// We can pick any of the set names for the merged set. Go for the
|
||||||
|
// shortest one to avoid picking the name of one of the classes that are
|
||||||
|
// artificially created by tablegen. So "FPR128_lo" instead of
|
||||||
|
// "QQQQ_with_qsub3_in_FPR128_lo".
|
||||||
|
if (RegUnitSets[SubIdx].Name.size() < RegUnitSets[SuperIdx].Name.size())
|
||||||
|
RegUnitSets[SuperIdx].Name = RegUnitSets[SubIdx].Name;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue