diff options
| author | Matthias Braun <matze@braunis.de> | 2015-11-13 22:30:27 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2015-11-13 22:30:27 +0000 |
| commit | 167cbd2167494ee8d3d76965ed104bdbddfa5477 (patch) | |
| tree | e663a45fca4d40e003f729ce06e74070642e4ddc /llvm/utils/TableGen | |
| parent | dfe0e99517433156d6b5adb89d5fc20fa0e4bb42 (diff) | |
| download | bcm5719-llvm-167cbd2167494ee8d3d76965ed104bdbddfa5477.tar.gz bcm5719-llvm-167cbd2167494ee8d3d76965ed104bdbddfa5477.zip | |
tablegen: Add a simple heuristic to get better names for pressure sets
Differential Revision: http://reviews.llvm.org/D14597
llvm-svn: 253095
Diffstat (limited to 'llvm/utils/TableGen')
| -rw-r--r-- | llvm/utils/TableGen/CodeGenRegisters.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp index f6eadce9c3d..0181f15d210 100644 --- a/llvm/utils/TableGen/CodeGenRegisters.cpp +++ b/llvm/utils/TableGen/CodeGenRegisters.cpp @@ -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; } } |

