[PATCH] D40418: [CodeGen] Print noreg as '_' in both MIR and debug output

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 10:48:52 PST 2017


qcolombet added inline comments.


================
Comment at: lib/CodeGen/TargetRegisterInfo.cpp:91
     if (!Reg)
-      OS << "%noreg";
+      OS << '_';
     else if (TargetRegisterInfo::isStackSlot(Reg))
----------------
thegameg wrote:
> arsenm wrote:
> > I think noreg is clearer here. It's easier to search debug output for %noreg than _
> As we already use both `%noreg` and `_` in MIR, I think we should decide which one to use universally. I personally like `_` because it is very easy to skip when reading/writing, but I agree that noreg is easier to search for.
I agree with Matt, noreg is clearer here.


https://reviews.llvm.org/D40418





More information about the llvm-commits mailing list