1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Go to file
Michael Spencer 86423aa8b7 [Clang] Expose RequiresNullTerminator in FileManager.
This is needed to fix the reason
0a2be46cfdb698fe (Modules: Invalidate out-of-date PCMs as they're
discovered) and 5b44a4b07fc1d ([modules] Do not cache invalid state for
modules that we attempted to load.) were reverted.

These patches changed Clang to use `isVolatile` when loading modules.
This had the side effect of not using mmap when loading modules, and
thus greatly increased memory usage.

The reason it wasn't using mmap is because `MemoryBuffer` plays some
games with file size when you request null termination, and it has to
disable these when `isVolatile` is set as the size may change by the
time it's mmapped. Clang by default passes
`RequiresNullTerminator = true`, and `shouldUseMmap` ignored if
`RequiresNullTerminator` was even requested.

This patch adds `RequiresNullTerminator` to the `FileManager` interface
so Clang can use it when loading modules, and changes `shouldUseMmap` to
only take volatility into account if `RequiresNullTerminator` is true.
This is fine as both `mmap` and a `read` loop are vulnerable to
modifying the file while reading, but are immune to the rename Clang
does when replacing a module file.

Differential Revision: https://reviews.llvm.org/D77772
2020-04-15 14:17:51 -07:00
benchmarks
bindings Add an SDK attribute to DICompileUnit 2020-03-11 14:14:06 -07:00
cmake [lit] Keep original cfg file case around. 2020-04-15 14:18:11 -04:00
docs [AMDGPU] Move DWARF proposal to separate file 2020-04-15 17:19:39 -04:00
examples Enable new passmanager plugin support for LTO. 2020-04-14 15:07:07 -07:00
include [Attributor] KindToAbstractAttributeMap: use SmallDenseMap 2020-04-16 00:12:45 +03:00
lib [Clang] Expose RequiresNullTerminator in FileManager. 2020-04-15 14:17:51 -07:00
projects Add few docs and implementation of strcpy and strcat. 2019-10-04 17:30:54 +00:00
resources
runtimes [runtimes] When COMPILER_RT is enabled, consider SANITIZER prefixes 2020-03-11 14:22:20 -07:00
test [llvm][CodeGen] Rename SVE gather prefetch intrinsics. [NFC] 2020-04-15 21:49:16 +01:00
tools Allow disabling of vectorization using internal options 2020-04-14 18:09:10 -07:00
unittests [Clang] Expose RequiresNullTerminator in FileManager. 2020-04-15 14:17:51 -07:00
utils Use maximum compression when packaging release tarballs. 2020-04-15 20:30:26 +02:00
.clang-format
.clang-tidy - Update .clang-tidy to ignore parameters of main like functions for naming violations in clang and llvm directory 2020-01-31 16:49:45 +00:00
.gitattributes Fix the "git modified" issue on the preserve-comments-crlf.s. 2019-09-10 12:17:49 +00:00
.gitignore Continue removing llgo. 2020-02-10 10:33:58 -08:00
CMakeLists.txt [Flang] add flang as a new subproject in cmake 2020-04-09 16:13:18 +01:00
CODE_OWNERS.TXT Remove myself from CODE_OWNERS. 2020-02-25 11:59:29 +00:00
configure
CREDITS.TXT Update email address. 2019-07-17 07:02:02 +00:00
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
llvm.spec.in Update structured references to the license to the new license. 2019-01-19 11:30:51 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
README.txt Test commit. 2020-03-14 18:08:26 -07:00
RELEASE_TESTERS.TXT Update the list of platforms & archs 2018-12-16 14:47:16 +00:00

The LLVM Compiler Infrastructure
================================

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.