[PATCH] D14597: tablegen: Simple heuristic for better pressure set names

Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 14:32:58 PST 2015


This revision was automatically updated to reflect the committed changes.
Closed by commit rL253095: tablegen: Add a simple heuristic to get better names for pressure sets (authored by matze).

Changed prior to commit:
  http://reviews.llvm.org/D14597?vs=39990&id=40180#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D14597

Files:
  llvm/trunk/utils/TableGen/CodeGenRegisters.cpp

Index: llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
===================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.cpp
@@ -1574,6 +1574,12 @@
           && 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;
       }
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14597.40180.patch
Type: text/x-patch
Size: 873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151113/5d0ef361/attachment.bin>


More information about the llvm-commits mailing list