This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Print noreg as '_' in both MIR and debug output
ClosedPublic

Authored by thegameg on Nov 24 2017, 3:33 AM.

Details

Reviewers
MatzeB
qcolombet
Summary

As part of the unification of the debug format and the MIR format, always print 'noreg' as '_'.

Diff Detail

Event Timeline

thegameg created this revision.Nov 24 2017, 3:33 AM
MatzeB accepted this revision.Nov 27 2017, 10:46 AM

LGTM, thanks

This revision is now accepted and ready to land.Nov 27 2017, 10:46 AM
arsenm added a subscriber: arsenm.Nov 27 2017, 10:47 AM
arsenm added inline comments.
lib/CodeGen/TargetRegisterInfo.cpp
91

I think noreg is clearer here. It's easier to search debug output for %noreg than _

thegameg added inline comments.Nov 28 2017, 4:51 AM
lib/CodeGen/TargetRegisterInfo.cpp
91

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.

qcolombet added inline comments.Nov 30 2017, 10:48 AM
lib/CodeGen/TargetRegisterInfo.cpp
91

I agree with Matt, noreg is clearer here.

thegameg closed this revision.Jan 2 2018, 2:30 AM

By using printReg in r319445 we end up with %noreg, in MIR and -debug, and _ is also supported when parsing.