1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/LTO
Ekaterina Romanova 2f41ac8718 Prevent data races in concurrent ThinLTO processes.
Make sure ThinLTO with caching doesn't use non-atomic writes to the cache file (to prevent data races and cache files corruption).

1. Place temp file to the same place where the caching directory is (instead of creating it the directory pointed to by TMP/TEMP variable). This will help to prevent using non-atomic rename and falling back to non-atomic "direct" write to the cache file.
2. if rename failed do not write to the cache file directly (direct write to the file is non-atomic and could cause data race conditions).
3. if cache file doesn't exist (e.g., because 'rename' failed or because some other reasons), bypass using the cache altogether.

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

llvm-svn: 328904
2018-03-30 21:35:42 +00:00
..
Caching.cpp [LTO] Remove unused Path parameter to AddBufferFn 2018-02-20 20:21:53 +00:00
CMakeLists.txt
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LTO.cpp Revert "[LTO] Support filtering by hotness threshold" 2018-03-08 01:13:10 +00:00
LTOBackend.cpp Revert "[LTO] Support filtering by hotness threshold" 2018-03-08 01:13:10 +00:00
LTOCodeGenerator.cpp Revert "[LTO] Support filtering by hotness threshold" 2018-03-08 01:13:10 +00:00
LTOModule.cpp Move TargetLoweringObjectFile from CodeGen to Target to fix layering 2018-03-23 23:58:19 +00:00
ThinLTOCodeGenerator.cpp Prevent data races in concurrent ThinLTO processes. 2018-03-30 21:35:42 +00:00
UpdateCompilerUsed.cpp Remove redundant includes from lib/LTO. 2017-12-13 21:30:53 +00:00