[PATCH] [MachineLICM] Use newer model of register pressure sets.

Quentin Colombet qcolombet at apple.com
Mon Apr 13 13:12:09 PDT 2015


Hi Daniel,

Looks good to me with a couple a nitpicks. See my inline comments.

Basically, the comments and variables names should be updated to reflect that we use the RegPressureSet and not the register class anymore for the base identifier.

Thanks,
-Quentin


================
Comment at: lib/CodeGen/MachineLICM.cpp:105
@@ -104,3 +104,3 @@
     // is higher than the limit, then it's considered high.
     SmallVector<unsigned, 8> RegLimit;
 
----------------
Update the comment to reflect that we now map the regPressureSet.

================
Comment at: lib/CodeGen/MachineLICM.cpp:358
@@ -362,3 +357,3 @@
     // Estimate register pressure during pre-regalloc pass.
-    unsigned NumRC = TRI->getNumRegClasses();
+    unsigned NumRC = TRI->getNumRegPressureSets();
     RegPressure.resize(NumRC);
----------------
Change the name of the variable to NumRPS or something.
Right now, this is confusing.

================
Comment at: lib/CodeGen/MachineLICM.cpp:1106
@@ -1118,3 +1105,3 @@
                                           bool CheapInstr) {
   for (const auto &ClassAndCost : Cost) {
     if (ClassAndCost.second <= 0)
----------------
Change the name to RPIdAndCost or something along those lines.

================
Comment at: lib/CodeGen/MachineLICM.cpp:1137
@@ -1149,3 +1136,3 @@
   for (auto &RP : BackTrace)
     for (const auto &ClassAndCost : Cost)
       RP[ClassAndCost.first] += ClassAndCost.second;
----------------
Ditto.

http://reviews.llvm.org/D8986

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list