This is an archive of the discontinued LLVM Phabricator instance.

New utility to visualize optimization records
ClosedPublic

Authored by anemet on Oct 6 2016, 3:21 PM.

Details

Summary

This is a new tool built on top of the new YAML ouput generated from
optimization remarks. It produces HTML for easy navigation and
visualization.

The tool assumes that hotness information for the remarks is available
(the YAML file was produced with PGO). It uses hotness to list the
remark prioritized by the hotness on the index page. Clicking the
source location of the remark in the list takes you the source where the
remarks are rendedered inlined in the source.

For now the tool is meant as prototype.

It's written in Python. It uses PyYAML to parse the input.

Diff Detail

Repository
rL LLVM

Event Timeline

anemet updated this revision to Diff 73861.Oct 6 2016, 3:21 PM
anemet retitled this revision from to New utility to visualize optimization records.
anemet updated this object.
anemet added a reviewer: hfinkel.
anemet added a subscriber: llvm-commits.
anemet added a comment.Oct 6 2016, 3:28 PM

A small example:

hfinkel accepted this revision.Oct 6 2016, 3:56 PM
hfinkel edited edge metadata.

This is neat, thanks!

So long as we're using Python, any though on using something like http://pygments.org/ to do syntax highlighting?

In any case, I suspect we'll want to change the interface a lot, but I'm happy for you to commit this and we can iterate in-tree.

utils/opt-viewer/opt-viewer.py
19 ↗(On Diff #73861)

FWIW, we have an llvm-cxxfilt tool, perhaps we should use it?

85 ↗(On Diff #73861)

<a tag here is missing its closing >

This revision is now accepted and ready to land.Oct 6 2016, 3:56 PM
anemet added a comment.Oct 6 2016, 7:31 PM

This is neat, thanks!

Thank you.

So long as we're using Python, any though on using something like http://pygments.org/ to do syntax highlighting?

Yes, that was probably my main motivation too for going with Python ;). I'll take a look in a follow-up.

In any case, I suspect we'll want to change the interface a lot, but I'm happy for you to commit this and we can iterate in-tree.

Absolutely.

utils/opt-viewer/opt-viewer.py
19 ↗(On Diff #73861)

I was thinking the same thing but I don't think that we currently install that in the macOS toolchain :(

85 ↗(On Diff #73861)

Yeah, I am very loose with those. Let me fix them before committing.

This revision was automatically updated to reflect the committed changes.