[PATCH] D47199: [MC] Remove PhysRegSize from MCRegisterClass

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 08:19:49 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL339350: [MC] Remove PhysRegSize from MCRegisterClass (authored by bjope, committed by ).

Repository:
  rL LLVM

https://reviews.llvm.org/D47199

Files:
  llvm/trunk/include/llvm/MC/MCRegisterInfo.h
  llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
  llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp


Index: llvm/trunk/include/llvm/MC/MCRegisterInfo.h
===================================================================
--- llvm/trunk/include/llvm/MC/MCRegisterInfo.h
+++ llvm/trunk/include/llvm/MC/MCRegisterInfo.h
@@ -41,7 +41,6 @@
   const uint16_t RegsSize;
   const uint16_t RegSetSize;
   const uint16_t ID;
-  const uint16_t PhysRegSize;
   const int8_t CopyCost;
   const bool Allocatable;
 
@@ -80,11 +79,6 @@
     return contains(Reg1) && contains(Reg2);
   }
 
-  /// Return the size of the physical register in bytes.
-  unsigned getPhysRegSize() const { return PhysRegSize; }
-  /// Temporary function to allow out-of-tree targets to switch.
-  unsigned getSize() const { return getPhysRegSize(); }
-
   /// getCopyCost - Return the cost of copying a value between two registers in
   /// this class. A negative number means the register class is very expensive
   /// to copy e.g. status flag register classes.
Index: llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
+++ llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
@@ -388,8 +388,7 @@
     return true;
   }
   unsigned BitSize = TRI->getSubRegIdxSize(SubIdx);
-  // Convert bit size to byte size to be consistent with
-  // MCRegisterClass::getSize().
+  // Convert bit size to byte size.
   if (BitSize % 8)
     return false;
 
Index: llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
===================================================================
--- llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
+++ llvm/trunk/utils/TableGen/RegisterInfoEmitter.cpp
@@ -1075,14 +1075,10 @@
 
   for (const auto &RC : RegisterClasses) {
     assert(isInt<8>(RC.CopyCost) && "Copy cost too large.");
-    uint32_t RegSize = 0;
-    if (RC.RSI.isSimple())
-      RegSize = RC.RSI.getSimple().RegSize;
     OS << "  { " << RC.getName() << ", " << RC.getName() << "Bits, "
        << RegClassStrings.get(RC.getName()) << ", "
        << RC.getOrder().size() << ", sizeof(" << RC.getName() << "Bits), "
        << RC.getQualifiedName() + "RegClassID" << ", "
-       << RegSize/8 << ", "
        << RC.CopyCost << ", "
        << ( RC.Allocatable ? "true" : "false" ) << " },\n";
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47199.159928.patch
Type: text/x-patch
Size: 2248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180809/80250215/attachment.bin>


More information about the llvm-commits mailing list