This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Add option to dump value name to GUID mapping
ClosedPublic

Authored by tejohnson on Mar 29 2016, 8:17 AM.

Details

Summary

Useful for debugging since we lose this correlation after the permodule
summary/VST is read and until we later materialize source modules in the
function importer.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 51919.Mar 29 2016, 8:17 AM
tejohnson retitled this revision from to [ThinLTO] Add option to dump value name to GUID mapping.
tejohnson updated this object.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.
mehdi_amini edited edge metadata.Apr 1 2016, 11:57 AM

That's close to what I implemented locally when I was debugging this code last month.
My plan to have a "nice" solution was to dump a map in a file that could be loaded by other pieces. For instance you could use the map file by doing opt -function-import .... -debug -debug-map-guid=path/to/map and expose an API that convert GUID to name.

Maybe on the short term it is not worth investing time in this and I won't oppose to add the easy solution you have.

In D18555#389713, @joker.eph wrote:

That's close to what I implemented locally when I was debugging this code last month.
My plan to have a "nice" solution was to dump a map in a file that could be loaded by other pieces. For instance you could use the map file by doing opt -function-import .... -debug -debug-map-guid=path/to/map and expose an API that convert GUID to name.

In D18555#389715, @joker.eph wrote:

Maybe on the short term it is not worth investing time in this and I won't oppose to add the easy solution you have.

Yea, I thought about something along those lines too, but decided the simple solution was sufficient for now. Note that this patch would be a subset of that approach anyway since it gives you the map that would be fed back in.

mehdi_amini accepted this revision.Apr 1 2016, 12:41 PM
mehdi_amini edited edge metadata.

Well it is not clear to me that it is an intermediate step, because ultimately you need a way to merge the information. I would have tried to address it a thin-link time.

But, ok it is useful enough and there is no other concrete plan right now, so LGTM.

This revision is now accepted and ready to land.Apr 1 2016, 12:41 PM
This revision was automatically updated to reflect the committed changes.