[PATCH] D43916: Named VReg support for MIR

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 1 15:02:30 PST 2018


plotfi added inline comments.


================
Comment at: include/llvm/CodeGen/MachineRegisterInfo.h:434
 
+  std::string getVRegName(unsigned Reg) const {
+    return VReg2Name.inBounds(Reg) ? VReg2Name[Reg] : "";
----------------
thegameg wrote:
> StringRef might be better here?
Yeah. I'll update the patch.


================
Comment at: include/llvm/CodeGen/TargetRegisterInfo.h:1155
+                   unsigned SubRegIdx = 0,
+                   const MachineRegisterInfo *MRI = nullptr);
 
----------------
thegameg wrote:
> Should we use `MRI->getTargetRegisterInfo` and only pass MRI to printReg?
Oh! that sounds pretty good. Hmm. The question is, does all the calling code where we call printReg have an MRI. From my initial survey that doesn't appear to be the case. 


Repository:
  rL LLVM

https://reviews.llvm.org/D43916





More information about the llvm-commits mailing list