This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][NFC] Use colors in CFG dumps
ClosedPublic

Authored by Amir on May 23 2022, 3:36 PM.

Details

Summary

Use color coding to distinguish nodes:

  • Entry nodes have bold border
  • Scalar (non-loopy) code is milk white
  • Outer loops are light yellow
  • Innermost loops are light blue

-print-loops needs to be enabled to provide BinaryLoopInfo.
Examples:


Diff Detail

Event Timeline

Amir created this revision.May 23 2022, 3:36 PM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: ayermolo. · View Herald Transcript
Amir published this revision for review.May 23 2022, 5:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 23 2022, 5:06 PM
rafauler accepted this revision.May 24 2022, 3:07 PM

LGTM

Should we add a description somewhere (perhaps in the option that enables graph dumps) the information that -print-loops can be enabled for color outputs?

This revision is now accepted and ready to land.May 24 2022, 3:07 PM
Amir updated this revision to Diff 433666.Jun 1 2022, 11:56 PM

Add a note in DumpDotAll help message about using -print-loops to enable
color-coded blocks.

Amir added a comment.Jun 1 2022, 11:56 PM

LGTM

Should we add a description somewhere (perhaps in the option that enables graph dumps) the information that -print-loops can be enabled for color outputs?

Done

Amir updated this revision to Diff 433668.Jun 2 2022, 12:16 AM

clang-format

This revision was automatically updated to reflect the committed changes.