This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Add standard print/debug utilities to EVT
ClosedPublic

Authored by reames on Feb 6 2023, 6:28 PM.

Details

Summary

Doing so makes it easier to do printf style debugging in idiomatic manner. I followed the code structure of Value with only the definition of dump being #ifdef out in non-debug builds. Not sure if this is the "right" option; we don't seem to have any single consistent scheme on how debug is handled.

Diff Detail

Event Timeline

reames created this revision.Feb 6 2023, 6:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2023, 6:28 PM
reames requested review of this revision.Feb 6 2023, 6:28 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2023, 6:28 PM
craig.topper added inline comments.Feb 6 2023, 6:46 PM
llvm/include/llvm/CodeGen/ValueTypes.h
459

V->dump should probably be more like V.dump() or VT.dump(). Shouldn't be an arrow.

reames updated this revision to Diff 495346.Feb 6 2023, 6:48 PM

Address review comment

This revision is now accepted and ready to land.Feb 6 2023, 9:16 PM
This revision was landed with ongoing or failed builds.Feb 7 2023, 8:39 AM
This revision was automatically updated to reflect the committed changes.