This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Move loading of cache entry to client
ClosedPublic

Authored by tejohnson on Aug 26 2016, 4:07 PM.

Details

Summary

Have the cache pass back the path to the cache entry when it
is ready to be loaded, instead of a buffer.

For gold-plugin we can simply pass this file back to gold directly,
which avoids expensive writing of a separate tmp file. Ensure
the cache entry is not deleted on cleanup by adjusting the setting
of the IsTemporary flags.

Moved the loading of the buffer into llvm-lto2 to maintain current
behavior.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson updated this revision to Diff 69446.Aug 26 2016, 4:07 PM
tejohnson retitled this revision from to [ThinLTO] Move loading of cache entry to client.
tejohnson updated this object.
tejohnson added a reviewer: mehdi_amini.
tejohnson added a subscriber: llvm-commits.
mehdi_amini accepted this revision.Aug 26 2016, 4:35 PM
mehdi_amini edited edge metadata.

LGTM, thanks.

This revision is now accepted and ready to land.Aug 26 2016, 4:35 PM
This revision was automatically updated to reflect the committed changes.
mehdi_amini added inline comments.Aug 26 2016, 10:35 PM
llvm/trunk/include/llvm/LTO/Caching.h
25

(I thought I commented inline when approving the revision, but didn't get through apparently)

Any reason not to use StringRef?
Or a const ref at minima?