[PATCH] D25348: New utility to visualize optimization records

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 15:56:01 PDT 2016


hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.

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.



> opt-viewer.py:19
> +
> +p = subprocess.Popen(['c++filt', '-n'], stdin=subprocess.PIPE, stdout=subprocess.PIPE)
> +def demangle(name):

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

> opt-viewer.py:85
> +    def render_source_line(self, linenum, line):
> +        print("<tr><td><a name=\"L{linenum}\"{linenum}</a><td><td><td><pre>{line}</tr>".format(
> +            **locals()), file=self.stream)

<a tag here is missing its closing >

https://reviews.llvm.org/D25348





More information about the llvm-commits mailing list