OSDN Git Service

[ThinLTO] Move loading of cache entry to client
authorTeresa Johnson <tejohnson@google.com>
Fri, 26 Aug 2016 23:29:14 +0000 (23:29 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 26 Aug 2016 23:29:14 +0000 (23:29 +0000)
commitd80408f437d650ddfb7343ce51a8b63ed842cdd6
treefa0155db95dd389dafe620ebd3be2a425da59d43
parentbc94acefe6aeb255040ee48b5fbd2ec899c3039e
[ThinLTO] Move loading of cache entry to client

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.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23946

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279883 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/LTO/Caching.h
lib/LTO/Caching.cpp
tools/gold/gold-plugin.cpp
tools/llvm-lto2/llvm-lto2.cpp