LLVM (Cool/Warm) DOT Printers for Profiling

Hi everyone,

I have been working with profiling in LLVM and I was wondering if it would be interesting to upstream the following DOT Printers for Profiling Visualization:
https://github.com/rcorcs/llvm-heat-printer

All suggestions are welcomed.

Thanks,

Rodrigo Rocha

Hi Rodrigo,

This work looks great and very valuable to those of us who use CFGs to diagnose optimisation issues.

Have you thought of trying to fold this into the existing LLVM -dot-cfg and -dot-cfg-only passes? The optimisation remark infrastructure is using hotness information when it is available, it seems like it would be a good idea to add this to graph generation if hotness information is available there too.

I don’t know how significant an amount of work that would be, but selfishly, I would find it a lot easier to use if it was in LLVM itself rather than having to build and load it as a plugin.

Sam

Hi Sam,

I’m glad you found it interesting and that it can be of some use.

I’ll look into the integration with the existing DOT Printers.

Cheers,

Rodrigo

Hi everyone,

I have added extended the CFGPrinter and CallPrinter with heat colors based on heuristics or profiling information.
It is based on my llvm-heat-printer:
https://github.com/rcorcs/llvm-heat-printer

Here you can find the diff of my patch.
It was developed on top of the svn trunk version.

I would like some help to see if I can upstream my contribution.

Thanks,

Rodrigo Rocha

rcor-heat-printer.diff (33.7 KB)