aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorEkaterina Romanova <katya_romanova@playstation.sony.com>2018-03-30 21:35:42 +0000
committerEkaterina Romanova <katya_romanova@playstation.sony.com>2018-03-30 21:35:42 +0000
commit0b01dfbba69d634c0fde133b5098d73a6f92ffea (patch)
treed36d3decf1d750e5a60e1d237211dc7f85144e19 /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parentd1fe360b06529490f9fab8ed3d30f57831241003 (diff)
downloadllvm-0b01dfbba69d634c0fde133b5098d73a6f92ffea.zip
llvm-0b01dfbba69d634c0fde133b5098d73a6f92ffea.tar.gz
llvm-0b01dfbba69d634c0fde133b5098d73a6f92ffea.tar.bz2
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
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
0 files changed, 0 insertions, 0 deletions