1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/include/llvm/LTO
Peter Collingbourne ff87ac19c3 LTO: Fix a potential race condition in the caching API.
After the call to sys::fs::exists succeeds, indicating a cache hit, we call
AddFile and the client will open the file using the supplied path. If the
client is using cache pruning, there is a potential race between the pruner
and the client. To avoid this, change the caching API so that it provides
a MemoryBuffer to the client, and have clients use that MemoryBuffer where
possible.

This scheme won't work with the gold plugin because the plugin API expects a
file path. So we have the gold plugin use the buffer identifier as a path and
live with the race for now. (Note that the gold plugin isn't actually affected
by the problem at the moment because it doesn't support cache pruning.)

This effectively reverts r279883 modulo the change to use the existing path
in the gold plugin.

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

llvm-svn: 298020
2017-03-17 00:34:07 +00:00
..
legacy Support: Add a cache pruning policy parser. 2017-03-16 03:42:00 +00:00
Caching.h LTO: Fix a potential race condition in the caching API. 2017-03-17 00:34:07 +00:00
Config.h [LTO] Add ability to emit assembly to new LTO API 2017-02-15 20:36:36 +00:00
LTO.h [LTO] Share the optimization remarks setup between Thin/Full LTO. 2017-02-10 23:49:38 +00:00
LTOBackend.h IPO, LTO: Plumb the summary from the LTO API into the pass manager. 2017-01-20 22:18:52 +00:00