llvm-project/llvm
Ekaterina Romanova 0b01dfbba6 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
..
bindings [bindings/go] Add a missing `,` in the test code to fix a go compile 2018-03-17 15:12:52 +00:00
cmake Rename llvm library from libLLVM-X.Y to libLLVM-X 2018-03-29 09:44:09 +00:00
docs [Kaleidoscope] Tiny typo fixes 2018-03-29 12:31:06 +00:00
examples Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h 2018-03-28 17:44:36 +00:00
include [MIR] Adding support for Named Virtual Registers in MIR. 2018-03-30 18:15:54 +00:00
lib Prevent data races in concurrent ThinLTO processes. 2018-03-30 21:35:42 +00:00
projects
resources
runtimes
test [Hexagon] Fix testcase 2018-03-30 19:46:28 +00:00
tools [LLVM-C] Finish exception instruction bindings - Round 2 2018-03-30 17:49:53 +00:00
unittests Style update. NFC. 2018-03-29 23:32:54 +00:00
utils Add missing dependency (headers are included from MC, so a link dependency could exist easily enough) 2018-03-29 00:29:43 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitattributes
.gitignore
CMakeLists.txt Ensure that DataTypes.h is installed now that it's moved to llvm-c 2018-03-21 18:21:57 +00:00
CODE_OWNERS.TXT
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.