This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Add option to dump per-module summary dot graph
ClosedPublic

Authored by tejohnson on Jan 24 2019, 4:53 PM.

Details

Summary

I found that there currently isn't a way to invoke exportToDot from
the command line for a per-module summary index, and therefore no
testing of that case. Add an internal option and use it to test dumping
of per module summary indexes.

In particular, I am looking at fixing the limitation that causes the
aliasee GUID in the per-module summary to be 0, and want to be able to
test that change.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Jan 24 2019, 4:53 PM
mehdi_amini added inline comments.Jan 24 2019, 8:52 PM
lib/Analysis/ModuleSummaryAnalysis.cpp
641 ↗(On Diff #183443)

It this something that can be pushed to the client? It does not necessarily seems to me that it belongs to a library method that builds the summary (unless maybe if you're seeing this as pure debugging)

tejohnson marked an inline comment as done.Jan 25 2019, 7:14 AM
tejohnson added inline comments.
lib/Analysis/ModuleSummaryAnalysis.cpp
641 ↗(On Diff #183443)

Not easily pushed into client - e.g. 'opt' simply invokes the BitcodeWriterPass passing in the flag as to whether to emit the summary index, and that pass simply adds the ModuleSummaryIndex building analysis pass as required. Unless by client you mean the bitcode writer? Since this should just be for debugging (and testing), making it an option on the builder analysis pass seemed to make sense.

mehdi_amini accepted this revision.Jan 27 2019, 10:35 AM
This revision is now accepted and ready to land.Jan 27 2019, 10:35 AM
evgeny777 accepted this revision.Jan 27 2019, 10:53 PM

LGTM. Thanks!

This revision was automatically updated to reflect the committed changes.