This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Print RegClasses on MI in verbose mode
ClosedPublic

Authored by thegameg on Jan 18 2018, 5:49 AM.

Details

Summary

r322086 removed the trailing information describing reg classes for each register.

This patch adds printing reg classes next to every register when individual operands/instructions/basic blocks are printed. In the case of dumping MIR or printing a full function, by default don't print it.

Diff Detail

Repository
rL LLVM

Event Timeline

thegameg created this revision.Jan 18 2018, 5:49 AM
dsanders accepted this revision.Jan 18 2018, 8:03 AM

LGTM with a couple comment nits

include/llvm/CodeGen/MachineOperand.h
275 ↗(On Diff #130398)

I'd go with 'but not when a fragment of the function is printed' or something to that effect to make it clear that the information is not available when you aren't looking at the whole function

lib/CodeGen/MachineFunction.cpp
525 ↗(On Diff #130398)

... since that information is already present.

This revision is now accepted and ready to land.Jan 18 2018, 8:03 AM

LGTM, thanks.

include/llvm/CodeGen/MachineBasicBlock.h
729 ↗(On Diff #130398)

How about calling the parameter IsStandalone instead? (similar for the other functions)

This revision was automatically updated to reflect the committed changes.

Sorry, I missed your comment @MatzeB. IsStandalone sounds better indeed, I fixed it in r322867.