summary refs log tree commit diff
path: root/src/rustllvm
AgeCommit message (Collapse)AuthorLines
2015-06-17Auto merge of #26025 - alexcrichton:update-llvm, r=brsonbors-43/+173
This commit updates the LLVM submodule in use to the current HEAD of the LLVM repository. This is primarily being done to start picking up unwinding support for MSVC, which is currently unimplemented in the revision of LLVM we are using. Along the way a few changes had to be made: * As usual, lots of C++ debuginfo bindings in LLVM changed, so there were some significant changes to our RustWrapper.cpp * As usual, some pass management changed in LLVM, so clang was re-scrutinized to ensure that we're doing the same thing as clang. * Some optimization options are now passed directly into the `PassManagerBuilder` instead of through CLI switches to LLVM. * The `NoFramePointerElim` option was removed from LLVM, favoring instead the `no-frame-pointer-elim` function attribute instead. * The `LoopVectorize` option of the LLVM optimization passes has been disabled as it causes a divide-by-zero exception to happen in LLVM for zero-sized types. This is reported as https://llvm.org/bugs/show_bug.cgi?id=23763 Additionally, LLVM has picked up some new optimizations which required fixing an existing soundness hole in the IR we generate. It appears that the current LLVM we use does not expose this hole. When an enum is moved, the previous slot in memory is overwritten with a bit pattern corresponding to "dropped". When the drop glue for this slot is run, however, the switch on the discriminant can often start executing the `unreachable` block of the switch due to the discriminant now being outside the normal range. This was patched over locally for now by having the `unreachable` block just change to a `ret void`.
2015-06-16rustc: Update LLVMAlex Crichton-43/+173
This commit updates the LLVM submodule in use to the current HEAD of the LLVM repository. This is primarily being done to start picking up unwinding support for MSVC, which is currently unimplemented in the revision of LLVM we are using. Along the way a few changes had to be made: * As usual, lots of C++ debuginfo bindings in LLVM changed, so there were some significant changes to our RustWrapper.cpp * As usual, some pass management changed in LLVM, so clang was re-scrutinized to ensure that we're doing the same thing as clang. * Some optimization options are now passed directly into the `PassManagerBuilder` instead of through CLI switches to LLVM. * The `NoFramePointerElim` option was removed from LLVM, favoring instead the `no-frame-pointer-elim` function attribute instead. Additionally, LLVM has picked up some new optimizations which required fixing an existing soundness hole in the IR we generate. It appears that the current LLVM we use does not expose this hole. When an enum is moved, the previous slot in memory is overwritten with a bit pattern corresponding to "dropped". When the drop glue for this slot is run, however, the switch on the discriminant can often start executing the `unreachable` block of the switch due to the discriminant now being outside the normal range. This was patched over locally for now by having the `unreachable` block just change to a `ret void`.
2015-06-14inverse the logic in code inclusionSébastien Marie-3/+3
instead of enumerate the (long) list of platforms to exclude, use only the short list of platforms to include. should fixes __morestack symbol problem under openbsd
2015-06-10fixes __morestack symbol problem on BSDsDave Huseby-2/+2
2015-06-09Auto merge of #25627 - murarth:execution-engine-fix, r=nrcbors-23/+35
* Removes `RustJITMemoryManager` from public API. This was really sort of an implementation detail to begin with. * `__morestack` is linked to C++ wrapper code and this pointer is used when resolving the symbol for `ExecutionEngine` code. * `__morestack_addr` is also resolved for `ExecutionEngine` code. This function is sometimes referenced in LLVM-generated code, but was not able to be resolved on Mac OS systems. * Added Windows support to `ExecutionEngine` API. * Added a test for basic `ExecutionEngine` functionality.
2015-06-08Changes to LLVM `ExecutionEngine` wrapperMurarth-23/+35
* Removes `RustJITMemoryManager` from public API. This was really sort of an implementation detail to begin with. * `__morestack` is linked to C++ wrapper code and this pointer is used when resolving the symbol for `ExecutionEngine` code. * `__morestack_addr` is also resolved for `ExecutionEngine` code. This function is sometimes referenced in LLVM-generated code, but was not able to be resolved on Mac OS systems. * Added Windows support to `ExecutionEngine` API. * Added a test for basic `ExecutionEngine` functionality.
2015-06-07rustc_trans: don't hardcode llvm version for conditional intrinsicsLuca Bruno-0/+8
This commit introduce a third parameter for compatible_ifn!, as new intrinsics are being added in recent LLVM releases and there is no need to hardcode a specific case. Signed-off-by: Luca Bruno <lucab@debian.org>
2015-06-07Remove useless `const`Tamir Duberstein-1/+1
2015-05-19rustc_llvm: Don't export constants across dllsAlex Crichton-1/+3
For imports of constants across DLLs to work on Windows it *requires* that the import be marked with `dllimport` (unlike functions where the marker is optional, but strongly recommended). This currently isn't working for importing FFI constants across boundaries, however, so the one constant exported from `rustc_llvm.dll` is now a function to be called instead.
2015-05-12rustc_llvm: Expose setting more DLL storage classesAlex Crichton-2/+3
Currently only `dllexport` is used, but more integration will require using `dllimport` as well.
2015-04-25Add singlethreaded fence intrinsics.Peter Marheine-2/+4
These new intrinsics are comparable to `atomic_signal_fence` in C++, ensuring the compiler will not reorder memory accesses across the barrier, nor will it emit any machine instructions for it. Closes #24118, implementing RFC 888.
2015-04-21rollup merge of #24635: tamird/llvm-3.5Alex Crichton-43/+13
r? @alexcrichton
2015-04-21rustc: Handle duplicate names merging archivesAlex Crichton-24/+55
When linking an archive statically to an rlib, the compiler will extract all contents of the archive and add them all to the rlib being generated. The current method of extraction is to run `ar x`, dumping all files into a temporary directory. Object archives, however, are allowed to have multiple entries with the same file name, so there is no method for them to extract their contents into a directory in a lossless fashion. This commit adds iterator support to the `ArchiveRO` structure which hooks into LLVM's support for reading object archives. This iterator is then used to inspect each object in turn and extract it to a unique location for later assembly.
2015-04-21LLVM < 3.5 is unsupported since bb18a3cTamir Duberstein-43/+13
2015-04-03Implement LLVMGetOrInsertGlobal wrapperSimonas Kazlauskas-0/+6
2015-04-03Wrap LLVM’s Module::getNamedValueSimonas Kazlauskas-0/+5
2015-03-14Drop support for LLVM < 3.5 and fix compile errors with 3.5Björn Steinbrink-108/+12
LLVM older that 3.6 has a bug that cause assertions when compiling certain constructs. For 3.5 there's still a chance that the bug might get fixed in 3.5.2, so let's keep allowing to compile with it for it for now.
2015-03-10Add support for target-cpu=nativeJulian Orth-1/+7
2015-03-05updating llvm-auto-clean-trigger tooDave Huseby-1/+1
2015-02-21Update LLVM to rust-llvm-2015-02-19Björn Steinbrink-1/+1
Fixes #22159 Fixes #21721
2015-02-16Update LLVM to release_36@229036Björn Steinbrink-1/+1
Fixes the crash blocking #21886.
2015-02-12Update LLVM to disable asserts in the PassInfo cacheBjörn Steinbrink-1/+1
Fixes #22233
2015-02-09Update llvm to rust-llvm-2015-02-09Björn Steinbrink-1/+1
Fixes #21996
2015-02-02Test fixes and rebase conflictsAlex Crichton-1/+1
2015-02-01Update LLVM to rust-llvm-2015-01-30Björn Steinbrink-111/+181
2015-01-22Better inline assembly errorsJohn Kåre Alsaker-0/+16
2015-01-18Redo Segmented stack support for DragonFlyMichael Neumann-1/+1
It got accidentially reverted in 44440e5.
2015-01-13Bump to ensure llvm is rebuiltRicho Healey-1/+1
2015-01-05Ensure that LLVM is rebuilt with recent changesMichael Neumann-1/+1
2015-01-03Initial version of AArch64 support.Akos Kiss-1/+1
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
2014-12-30debuginfo: Add a rust-gdb shell script that will start GDB with Rust pretty ↵Michael Woerister-3/+9
printers enabled.
2014-12-11Add LLVM ExecutionEngine APIMurarth-0/+113
2014-10-12optimize position independent code in executablesDaniel Micay-0/+2
Position independent code has fewer requirements in executables, so pass the appropriate flag to LLVM in order to allow more optimization. At the moment this means faster thread-local storage.
2014-10-04Update LLVM.Luqman Aden-11/+56
2014-09-27Translate inline assembly errors back to source locationsKeegan McAllister-0/+16
Fixes #17552.
2014-09-12Add -C remark for LLVM optimization remarksKeegan McAllister-0/+50
Fixes #17116.
2014-09-12Add a Rust string ostream for LLVMKeegan McAllister-8/+32
2014-09-08Update LLVM to fix a crash in the MergeFunc passBjörn Steinbrink-1/+1
2014-08-15Fix builds with LLVM < 3.6Björn Steinbrink-0/+8
2014-08-05Added clarification regarding rust_try_inner.Vadim Chugunov-1/+1
2014-08-04Update LLVMVadim Chugunov-3/+3
2014-07-29Update LLVM to fix miscompilations due to wrongfully removed lifetime intrinsicsBjörn Steinbrink-1/+1
Fixes #15972 and #16011.
2014-07-25rustllvm: Stub out some functions for llvm < 3.5Luqman Aden-0/+9
2014-07-25librustc: Use builder for llvm attributes.Luqman Aden-0/+17
2014-07-24rustllvm: Don't require null terminators in filesAlex Crichton-9/+25
Apparently the default getFile implementation for a memory buffer in LLVM ends up requiring a null terminator at the end of the file. This isn't true a good bit of the time apparently on OSX. There have been a number of failed nightly/snapshot builds recently with this strange assertion. This modifies the calls to MemoryBuffer::getFile to explicitly not ask for a null terminator.
2014-07-24Updated LLVM for iOSValerii Hiora-6/+7
There should be no more problems during SjLj pass
2014-07-21Update LLVM to address an issue with range metadata in hoisted loadsJakub Wieczorek-1/+1
Fixes #15793.
2014-07-21Update LLVM to include NullCheckElimination passBjörn Steinbrink-1/+1
Fixes #11751
2014-06-21Update LLVMBjörn Steinbrink-3/+11
To fix #8106, we need an LLVM version that contains r211082 aka 0dee6756 which fixes a bug that blocks that issue. There have been some tiny API changes in LLVM, and cmpxchg changed its return type. The i1 part of the new return type is only interesting when using the new weak cmpxchg, which we don't do.
2014-06-12debuginfo: Fix issue with unique type IDs not being passed to LLVM for LLVM 3.4Michael Woerister-2/+7