Go to file
Zachary Turner 579264bd59 Support skewed stream arrays.
VarStreamArray was built on the assumption that it is backed by a
StreamRef, and offset 0 of that StreamRef is the first byte of the first
record in the array.

This is a logical and intuitive assumption, but unfortunately we have
use cases where it doesn't hold. Specifically, a PDB module's symbol
stream is prefixed by 4 bytes containing a magic value, and the first
byte of record data in the array is actually at offset 4 of this byte
sequence.

Previously, we would just truncate the first 4 bytes and then construct
the VarStreamArray with the resulting StreamRef, so that offset 0 of the
underlying stream did correspond to the first byte of the first record,
but this is problematic, because symbol records reference other symbol
records by the absolute offset including that initial magic 4 bytes. So
if another record wants to refer to the first record in the array, it
would say "the record at offset 4".

This led to extremely confusing hacks and semantics in loading code, and
after spending 30 minutes trying to get some math right and failing, I
decided to fix this in the underlying implementation of VarStreamArray.
Now, we can say that a stream is skewed by a particular amount. This
way, when we access a record by absolute offset, we can use the same
values that the records themselves contain, instead of having to do
fixups.

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

llvm-svn: 348499
2018-12-06 16:55:00 +00:00
clang [OPENMP][NVPTX] Fix globalization of the mapped array sections. 2018-12-06 15:35:13 +00:00
clang-tools-extra [clangd] Remove the test that sometimes deadlocks 2018-12-06 15:14:11 +00:00
compiler-rt Add new `__sanitizer_mz_default_zone()` API which returns the address of the ASan malloc zone. This API will be used for testing in future patches. 2018-12-06 12:39:00 +00:00
debuginfo-tests Set config.lit_tools_dir, which is needed by lit.llvm.initialize. 2018-11-06 21:54:27 +00:00
libclc travis: Add cmake build 2018-11-27 16:07:21 +00:00
libcxx [libcxx] Make return value of array<T, 0>.data() checked only for libc++ 2018-12-06 13:52:20 +00:00
libcxxabi [libcxx] Remove bad_array_length 2018-11-29 19:44:57 +00:00
libunwind [CMake] Passthrough CFLAGS when checking the compiler-rt path 2018-11-14 00:09:26 +00:00
lld [LLD][ELF] - Use auto. NFC. 2018-12-06 10:56:11 +00:00
lldb Support skewed stream arrays. 2018-12-06 16:55:00 +00:00
llgo Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
llvm Support skewed stream arrays. 2018-12-06 16:55:00 +00:00
openmp [OPENMP][NVPTX]Fix __kmpc_flush to flush the memory per system, not per block. 2018-12-06 15:27:58 +00:00
parallel-libs Update copyright year to 2018. 2018-06-18 12:22:17 +00:00
polly [CMake] Fix generation of exported targets in build directory 2018-11-06 15:18:17 +00:00
README.md Update the project name in README.md 2018-10-19 00:03:01 +00:00

README.md

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.