This is an archive of the discontinued LLVM Phabricator instance.

[lld/LTO] Add support for optimization remarks
ClosedPublic

Authored by davide on Feb 12 2017, 3:06 PM.

Details

Summary

Quite easy now that the yak is shaved.
For info on the feature: http://llvm.org/devmtg/2016-11/Slides/Nemet-Compiler-assistedPerformanceAnalysis.pdf
Makes much easier to visualize optimization decisions (loop vectorizations, inlining decisions etc..). I plan to use it for tuning profile-guided inlining.
This was only supported for Mach-O, but I happen to be interested in another object format.

Diff Detail

Repository
rL LLVM

Event Timeline

davide created this revision.Feb 12 2017, 3:06 PM
ruiu edited edge metadata.Feb 13 2017, 9:29 AM

Generally looking file, but I'll let people who are familiar with this feature to sign off.

What is expected to happen if you pass only -opt-remarks-filename but no -opt-remarks-with-hotness?

anemet accepted this revision.Feb 13 2017, 9:43 AM

Indeed, it looks very easy. LGTM from the opt-diat point of view.

This revision is now accepted and ready to land.Feb 13 2017, 9:43 AM
In D29878#675147, @ruiu wrote:

Generally looking file, but I'll let people who are familiar with this feature to sign off.

What is expected to happen if you pass only -opt-remarks-filename but no -opt-remarks-with-hotness?

It happens that you generate a remarks filename without hotness informations.

In D29878#675147, @ruiu wrote:

Generally looking file, but I'll let people who are familiar with this feature to sign off.

What is expected to happen if you pass only -opt-remarks-filename but no -opt-remarks-with-hotness?

It happens that you generate a remarks filename without hotness informations.

*remarks file.

In D29878#675147, @ruiu wrote:

Generally looking file, but I'll let people who are familiar with this feature to sign off.

What is expected to happen if you pass only -opt-remarks-filename but no -opt-remarks-with-hotness?

It happens that you generate a remarks filename without hotness informations.

The idea being that without hotness the opt-diag emitter pass does not require BlockFrequencyInfo which may cost some comple-time.

This revision was automatically updated to reflect the committed changes.