about summary refs log tree commit diff
path: root/src/llvm
AgeCommit message (Collapse)AuthorLines
2019-01-25Rebase to the llvm-project monorepoJosh Stone-0/+0
The new git submodule src/llvm-project is a monorepo replacing src/llvm and src/tools/{clang,lld,lldb}. This also serves as a rebase for these projects to the new 8.x branch from trunk. The src/llvm-emscripten fork is unchanged for now.
2018-12-18Update LLVM submoduleJethro Beekman-0/+0
2018-12-13Update LLVM submoduleNikita Popov-0/+0
2018-11-28Update LLVMNikita Popov-0/+0
In particular to pull in a fix for #56265.
2018-11-25Upgrade to LLVM trunkAlex Crichton-0/+0
2018-10-30Fix DWARF generation for enumsTom Tromey-0/+0
The DWARF generated for Rust enums was always somewhat unusual. Rather than using DWARF constructs directly, it would emit magic field names like "RUST$ENCODED$ENUM$0$Name" and "RUST$ENUM$DISR". Since PR #45225, though, even this has not worked -- the ad hoc scheme was not updated to handle the wider variety of niche-filling layout optimizations now available. This patch changes the generated DWARF to use the standard tags meant for this purpose; namely, DW_TAG_variant and DW_TAG_variant_part. The patch to implement this went in to LLVM 7. In order to work with older versions of LLVM, and because LLVM doesn't do anything here for PDB, the existing code is kept as a fallback mode. Support for this DWARF is in the Rust lldb and in gdb 8.2. Closes #32920 Closes #32924 Closes #52762 Closes #53153
2018-09-16Update LLVM to fix "bool" arguments on PPC32Lion Yang-0/+0
Fixes #50960.
2018-09-11Update LLVM to fix GlobalISel dbg.declareJosh Stone-0/+0
Fixes #49807.
2018-08-31Update LLVM submoduleAlex Crichton-0/+0
This commit updates the LLVM submodule to the current trunk of LLVM itself. This brings a few notable improvements for the wasm target: * Support for wasm atomic instructions is greatly improved * Renamed memory wasm intrinsics are fully supported * LLD has fixed a quadratic execution bug with large numbers of relocations in wasm files. The compiler-rt submodule has been updated in tandem as well.
2018-08-04Update LLVM submodule to 7.0Alex Crichton-0/+0
This commit updates the following submodules to LLVM's [recently branched][1] 7.0 release branch: * src/llvm * src/tools/lld * src/libcompiler_builtins/compiler-rt [1]: https://lists.llvm.org/pipermail/llvm-dev/2018-August/125004.html Closes #52970
2018-07-10Upgrade to LLVM's master branch (LLVM 7)Alex Crichton-0/+0
This commit upgrades the main LLVM submodule to LLVM's current master branch. The LLD submodule is updated in tandem as well as compiler-builtins. Along the way support was also added for LLVM 7's new features. This primarily includes the support for custom section concatenation natively in LLD so we now add wasm custom sections in LLVM IR rather than having custom support in rustc itself for doing so. Some other miscellaneous changes are: * We now pass `--gc-sections` to `wasm-ld` * The optimization level is now passed to `wasm-ld` * A `--stack-first` option is passed to LLD to have stack overflow always cause a trap instead of corrupting static data * The wasm target for LLVM switched to `wasm32-unknown-unknown`. * The syntax for aligned pointers has changed in LLVM IR and tests are updated to reflect this. * The `thumbv6m-none-eabi` target is disabled due to an [LLVM bug][llbug] Nowadays we've been mostly only upgrading whenever there's a major release of LLVM but enough changes have been happening on the wasm target that there's been growing motivation for quite some time now to upgrade out version of LLD. To upgrade LLD, however, we need to upgrade LLVM to avoid needing to build yet another version of LLVM on the builders. The revision of LLVM in use here is arbitrarily chosen. We will likely need to continue to update it over time if and when we discover bugs. Once LLVM 7 is fully released we can switch to that channel as well. [llbug]: https://bugs.llvm.org/show_bug.cgi?id=37382
2018-07-02Update LLVM to bring in a wasm codegen fixAlex Crichton-0/+0
Closes #51986
2018-06-29Update LLVM to 1c817c7a0c828b8fc8e8e462afbe5db41c7052d1Mike Hommey-0/+0
https://github.com/rust-lang/llvm/pull/118 https://github.com/rust-lang/llvm/pull/119
2018-05-22Update LLVM to pull in another wasm fixAlex Crichton-0/+0
Closes #50869
2018-05-18Update LLVM to 56c931901cfb85cd6f7ed44c7d7520a8de1edf97Anthony Ramine-0/+0
This brings in https://github.com/rust-lang/llvm/pull/115, which fixes https://github.com/rust-lang/rust/issues/49873.
2018-05-15Update LLVM to 1abfd0e562cc8f7a9577d97ee92246699093b954Anthony Ramine-0/+0
https://github.com/rust-lang/llvm/pull/111 https://github.com/rust-lang/llvm/pull/114
2018-05-10Pull in a wasm fix from LLVM upstreamAlex Crichton-0/+0
This pulls in a fix for https://bugs.llvm.org/show_bug.cgi?id=36564 which has already landed in upstream LLVM and should... Closes rust-lang-nursery/rust-wasm#168
2018-05-09ci: Compile LLVM with Clang 6.0.0Alex Crichton-0/+0
Currently on CI we predominately compile LLVM with the default system compiler which means gcc on Linux, some version of Clang on OSX, MSVC on Windows, and gcc on MinGW. This commit switches Linux, OSX, and Windows to all use Clang 6.0.0 to build LLVM (aka the C/C++ compiler as part of the bootstrap). This looks to generate faster code according to #49879 which translates to a faster rustc (as LLVM internally is faster) The major changes here were to the containers that build Linux releases, basically adding a new step that uses the previous gcc 4.8 compiler to compile the next Clang 6.0.0 compiler. Otherwise the OSX and Windows scripts have been updated to download precompiled versions of Clang 6 and configure the build to use them. Note that `cc` was updated here to fix using `clang-cl` with `cc-rs` on MSVC, as well as an update to `sccache` on Windows which was needed to correctly work with `clang-cl`. Finally the MinGW compiler is entirely left out here intentionally as it's currently thought that Clang can't generate C++ code for MinGW and we need to use gcc, but this should be verified eventually.
2018-04-12Use the GlobalAlloc trait for #[global_allocator]Simon Sapin-0/+0
2018-03-10Merge LLVM fix for undefined bss globalsvarkor-0/+0
This fixes #41315.
2018-03-06rustc: Update LLVMAlex Crichton-0/+0
This pulls in the rest of LLVM's `release_60` branch (the actual 6.0.0 release) and also pulls in a cherry-pick to... Closes #48226
2018-02-28Update LLVM submodule a bit furtherAlex Crichton-0/+0
2018-02-27Backport LLVM fixes for a JumpThreading / assume intrinsic bugBjörn Steinbrink-0/+0
2018-02-09rustc: Upgrade to LLVM 6Alex Crichton-0/+0
The following submodules have been updated for a new version of LLVM: - `src/llvm` - `src/libcompiler_builtins` - transitively contains compiler-rt - `src/dlmalloc` This also updates the docker container for dist-i686-freebsd as the old 16.04 container is no longer capable of building LLVM. The compiler-rt/compiler-builtins and dlmalloc updates are pretty routine without much interesting happening, but the LLVM update here is of particular note. Unlike previous updates I haven't cherry-picked all existing patches we had on top of our LLVM branch as we have a [huge amount][patches4] and have at this point forgotten what most of them are for. Instead I started from the current `release_60` branch in LLVM and only applied patches that were necessary to get our tests working and building. The current set of custom rustc-specific patches included in this LLVM update are: * rust-lang/llvm@1187443 - this is how we actually implement `cfg(target_feature)` for now and continues to not be upstreamed. While a hazard for SIMD stabilization this commit is otherwise keeping the status quo of a small rustc-specific feature. * rust-lang/llvm@013f2ec - this is a rustc-specific optimization that we haven't upstreamed, notably teaching LLVM about our allocation-related routines (which aren't malloc/free). Once we stabilize the global allocator routines we will likely want to upstream this patch, but for now it seems reasonable to keep it on our fork. * rust-lang/llvm@a65bbfd - I found this necessary to fix compilation of LLVM in our 32-bit linux container. I'm not really sure why it's necessary but my guess is that it's because of the absolutely ancient glibc that we're using. In any case it's only updating pieces we're not actually using in LLVM so I'm hoping it'll turn out alright. This doesn't seem like something we'll want to upstream.c * rust-lang/llvm@77ab1f0 - this is what's actually enabling LLVM to build in our i686-freebsd container, I'm not really sure what's going on but we for sure probably don't want to upstream this and otherwise it seems not too bad for now at least. * rust-lang/llvm@9eb9267 - we currently suffer on MSVC from an [upstream bug] which although diagnosed to a particular revision isn't currently fixed upstream (and the bug itself doesn't seem too active). This commit is a partial revert of the suspected cause of this regression (found via a bisection). I'm sort of hoping that this eventually gets fixed upstream with a similar fix (which we can replace in our branch), but for now I'm also hoping it's a relatively harmless change to have. After applying these patches (plus one [backport] which should be [backported upstream][llvm-back]) I believe we should have all tests working on all platforms in our current test suite. I'm like 99% sure that we'll need some more backports as issues are reported for LLVM 6 when this propagates through nightlies, but that's sort of just par for the course nowadays! In any case though some extra scrutiny of the patches here would definitely be welcome, along with scrutiny of the "missing patches" like a [change to pass manager order](rust-lang/llvm@27174447533), [another change to pass manager order](rust-lang/llvm@c782febb7b9), some [compile fixes for sparc](rust-lang/llvm@1a83de63c42), and some [fixes for solaris](rust-lang/llvm@c2bfe0abb). [patches4]: https://github.com/rust-lang/llvm/compare/5401fdf23...rust-llvm-release-4-0-1 [backport]: https://github.com/rust-lang/llvm/commit/5c54c252db [llvm-back]: https://bugs.llvm.org/show_bug.cgi?id=36114 [upstream bug]: https://bugs.llvm.org/show_bug.cgi?id=36096 --- The update to LLVM 6 is desirable for a number of reasons, notably: * This'll allow us to keep up with the upstream wasm backend, picking up new features as they start landing. * Upstream LLVM has fixed a number of SIMD-related compilation errors, especially around AVX-512 and such. * There's a few assorted known bugs which are fixed in LLVM 5 and aren't fixed in the LLVM 4 branch we're using. * Overall it's not a great idea to stagnate with our codegen backend! This update is mostly powered by #47730 which is allowing us to update LLVM *independent* of the version of LLVM that Emscripten is locked to. This means that when compiling code for Emscripten we'll still be using the old LLVM 4 backend, but when compiling code for any other target we'll be using the new LLVM 6 target. Once Emscripten updates we may no longer need this distinction, but we're not sure when that will happen! Closes #43370 Closes #43418 Closes #47015 Closes #47683 Closes rust-lang-nursery/stdsimd#157 Closes rust-lang-nursery/rust-wasm#3
2018-01-26Upgrade LLVM to incorporate a fix for #47364Björn Steinbrink-0/+0
Fixes #47364
2017-12-24Try to find a better pass manager orderAriel Ben-Yehuda-0/+0
Fixes #45466
2017-12-14Simplify CFG after IndVarSimplifyAriel Ben-Yehuda-0/+0
Fixes #45466
2017-11-30wasm: Update LLVM to fix a testAlex Crichton-0/+0
This commit updates LLVM with some tweaks to the integer <-> floating point conversion instructions to ensure that `as` in Rust doesn't trap. Closes #46298
2017-11-28ci: Start running wasm32 tests on TravisAlex Crichton-0/+0
This commit allocates a builder to running wasm32 tests on Travis. Not all test suites pass right now so this is starting out with just the run-pass and the libcore test suites. This'll hopefully give us a pretty broad set of coverage for integration in rustc itself as well as a somewhat broad coverage of the llvm backend itself through integration/unit tests.
2017-11-24rustbuild: Update LLVM and enable ThinLTOAlex Crichton-0/+0
This commit updates LLVM to fix #45511 (https://reviews.llvm.org/D39981) and also reenables ThinLTO for libtest now that we shouldn't hit #45768. This also opportunistically enables ThinLTO for libstd which was previously blocked (#45661) on test failures related to debuginfo with a presumed cause of #45511. Closes #45511
2017-11-15Emit debug info for trait object pointerTom Tromey-0/+0
Emit better debugging information for a trait object pointer. In particular, now: * The fields are explicitly represented in the DWARF; * DWARF for the vtable itself is emitted; and * The DWARF for the vtable's type has a DW_AT_containing_type which points to the concrete type for which the vtable was emitted. This is a small DWARF extension, that allows debuggers to determine the real type of the object to which a trait object points. I'll submit the gdb patch to take advantage of this new debuginfo once this lands. The vtable type is not currently complete -- it doesn't include members for the pointers it contains. This information was not needed for this feature. This addresses part 1 of #1563.
2017-11-12Update LLVM to fix miscompiles with -Copt-level=z on WindowsBjörn Steinbrink-0/+0
Fixes #45034
2017-11-06rustbuild: Re-enable ThinLTO for MIPSAlex Crichton-0/+0
Now that the upstream LLVM bug is now fixed this commit cherry-picks the commit onto our LLVM and then re-enables the ThinLTO paths for MIPS. Closes #45654
2017-10-11rustc: Update LLVM with a ThinLTO fixAlex Crichton-0/+0
This commit updates LLVM with a patch that's landed upstream to fix an assertion that was tripping when ThinLTO was activated. Unfortunately I wasn't able to get a reduced test case, but I've tested manually on the affected crates and the assertion is indeed fixed. Closes #45131
2017-10-05Faster compile times for release builds with llvm fixAndreas Jonson-0/+0
2017-07-18Fix LLVM assertion when a weak symbol is defined in global_asm.Vadzim Dambrouski-0/+0
This change will fix the issue from https://github.com/japaric/svd2rust/pull/130
2017-07-12[LLVM] Avoid losing the !nonnull attribute in SROAAriel Ben-Yehuda-0/+0
This still does not work on 32-bit archs because of an LLVM limitation, but this is only an optimization, so let's push it on 64-bit only for now. Fixes #37945
2017-07-06rustc: Implement stack probes for x86Alex Crichton-0/+0
This commit implements stack probes on x86/x86_64 using the freshly landed support upstream in LLVM. The purpose of stack probes here are to guarantee a segfault on stack overflow rather than having a chance of running over the guard page already present on all threads by accident. At this time there's no support for any other architecture because LLVM itself does not have support for other architectures.
2017-06-27Rebase LLVM on top of LLVM 4.0.1Ariel Ben-Yehuda-0/+0
Fixes #42893.
2017-06-21Update LLVM to fix unsigned multiplication overflowJames Duley-0/+0
check for some targets, notably ARMv6-M.
2017-06-19Update LLVM to pick StackColoring improvementAriel Ben-Yehuda-0/+0
Fixes #40883.
2017-06-19Backport fixes to LLVM 4.0 ARM codegen bugsAriel Ben-Yehuda-0/+0
So ARM had quite a few codegen bugs on LLVM 4.0 which are fixed on LLVM trunk. This backports 5 of them: r297871 - ARM: avoid clobbering register in v6 jump-table expansion. - fixes rust-lang/rust#42248 r294949 - [Thumb-1] TBB generation: spot redefinitions of index r295816 - [ARM] Fix constant islands pass. r300870 - [Thumb-1] Fix corner cases for compressed jump tables r302650 - [IfConversion] Add missing check in IfConversion/canFallThroughTo - unblocks rust-lang/rust#39409
2017-06-15Add a no-system-llvm compilecheck headerSimonas Kazlauskas-0/+0
2017-06-08Upgrade LLVMSimonas Kazlauskas-0/+0
Includes https://github.com/rust-lang/llvm/pull/80 Includes https://github.com/rust-lang/llvm/pull/79 Also adds tests and thus fixes #24194
2017-05-13LLVM: Add support for EABI-compliant libcalls on MSP430.Vadzim Dambrouski-0/+0
This change will allow rust code to have proper support for division and multiplication using libgcc libcalls.
2017-05-04Update llvm to pull in various backportsTim Neumann-0/+0
2017-04-27Update LLVM to fix incorrect codegen on MSP430.Vadzim Dambrouski-0/+0
The bug was reported by @akovaski here: https://github.com/rust-embedded/rfcs/issues/20#issuecomment-296482148
2017-04-26Cherry pick LLVM hexagon fixesMichael Wu-0/+0
2017-04-23FIN/LLVM: new rust patches required for 4.0Tim Neumann-0/+0
2017-04-23FIN/LLVM: adopt all applicable rust llvm patchesTim Neumann-0/+0