This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Allow printing MachineMemOperands with less context in SDAGDumper
ClosedPublic

Authored by thegameg on Mar 18 2018, 1:57 PM.

Diff Detail

Event Timeline

thegameg created this revision.Mar 18 2018, 1:57 PM
bogner accepted this revision.Apr 10 2018, 11:26 AM

Would this be easier to follow if we overloaded printMemOperand with a variant that took the variables we're declaring here (M, MF, etc) and simply called into it? The "if (G)" condition would set them up and the "else" side would just pass null pointers.

In any case, LGTM. Feel free to commit once you've tried that and decided which is better.

This revision is now accepted and ready to land.Apr 10 2018, 11:26 AM

Thanks! Your suggestion is much more readable.

This revision was automatically updated to reflect the committed changes.