1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

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:
Matthias Braun 2015-11-13 22:30:27 +00:00
parent 8328302c3f
commit 164bc6fc2c

View File

@ -1574,6 +1574,12 @@ void CodeGenRegBank::pruneUnitSets() {
&& UnitWeight == RegUnits[SuperSet.Units.back()].Weight) {
DEBUG(dbgs() << "UnitSet " << SubIdx << " subsumed by " << SuperIdx
<< "\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;
}
}