Uh oh!
There was an error while loading. Please reload this page.
rustc: Upgrade to LLVM 6 - #47828
Conversation
rust-highfive
commented
Jan 28, 2018
(rust_highfive has picked a reviewer for you, use r? to override) |
alexcrichton
commented
Jan 28, 2018
bors
commented
Jan 28, 2018
rustc: Upgrade to LLVM 6 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@2717444), [another change to pass manager order](rust-lang/llvm@c782feb), some [compile fixes for sparc](rust-lang/llvm@1a83de6), and some [fixes for solaris](rust-lang/llvm@c2bfe0a). [patches4]: rust-lang/llvm@5401fdf...rust-llvm-release-4-0-1 [backport]: rust-lang/llvm@5c54c25 [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#43370Closes#43418Closes#47015Closes#47683Closesrust-lang/stdarch#157 Closes rust-lang-nursery/rust-wasm#3
bors
commented
Jan 28, 2018
☀️ Test successful - status-travis |
alexcrichton
commented
Jan 29, 2018
Perf comparison shows that nothing is too bad! |
est31
commented
Jan 29, 2018
Up to 13.5% improvement... wow. |
nikomatsakis
commented
Jan 29, 2018
@bors r+ Let's do it. |
bors
commented
Jan 29, 2018
📌 Commit 586488c has been approved by |
cuviper
commented
Jan 29, 2018
Maybe update run-pass/sse2 to Apart from that, testing on this branch also looks good with external LLVM 5. |
mattico
commented
Jan 30, 2018
I did some investigation on the FreeBSD issue. FreeBSD 10 uses Clang 3.0. Clang didn't support std::atomic until 3.3. I think that's all the issue is. FreeBSD 10 is only supported until Oct 31 of this year, so it should be safe to update that soon enough. |
alexcrichton
commented
Jan 30, 2018
kennytm
commented
Jan 30, 2018
@bors p=1 |
bors
commented
Jan 30, 2018
rustc: Upgrade to LLVM 6 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](rust-lang/llvm@f128612...rust-llvm-release-6-0-0) 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@2717444), [another change to pass manager order](rust-lang/llvm@c782feb), some [compile fixes for sparc](rust-lang/llvm@1a83de6), and some [fixes for solaris](rust-lang/llvm@c2bfe0a). [patches4]: rust-lang/llvm@5401fdf...rust-llvm-release-4-0-1 [backport]: rust-lang/llvm@5c54c25 [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#43370Closes#43418Closes#47015Closes#47683Closesrust-lang/stdarch#157 Closes rust-lang-nursery/rust-wasm#3
bors
commented
Jan 30, 2018
💔 Test failed - status-appveyor |
kennytm
commented
Jan 30, 2018
😕 Assuming spurious first. Could not compile |
alexcrichton
commented
Jan 30, 2018
@bors: r- nah I saw that in development and thought it was spurious, at this point I sort of doubt it is... |
Zoxc
commented
Jan 30, 2018
I see access violations all the time when building on Windows using master, rebuilding makes it go away, so this error might be spurious. |
bors
commented
Feb 10, 2018
bors
commented
Feb 10, 2018
☀️ Test successful - status-appveyor, status-travis |
kennytm
commented
Feb 10, 2018
o_O The debugging code seems harmless, but is this supposed to be get actually merged now? |
alexcrichton
commented
Feb 10, 2018
@kennytm I'm sort of just glad to have this done with, but I'll send a follow-up to clean up that code. With #47657 (comment) though it seems like it's not helping anyway... |
shepmaster
commented
Feb 10, 2018
alexcrichton
commented
Feb 10, 2018
@shepmaster oh I was just linking to the failure on #47657, but yeah #48116 is in general tracking the failure. |
boozook
commented
Feb 14, 2018
Now really looking forward to the bitcode feature of LLVM7. Today - LLVM6, tomorrow - LLVM7! |
@alexcrichton rust-lang/llvm@9eb9267 - https://bugs.llvm.org/show_bug.cgi?id=36096 |
gaming-hacker
commented
Apr 7, 2018
Not to nag but has this issue with llvm-60 been resolved on OSX/Linux and merged into master? |
shepmaster
commented
Apr 7, 2018
Yes it has been merged. You can tell by scrolling to the top of the page and checking out the header: If you click through to the commit, you can see which tags the commit is part of: You can also check out the 1.25 release notes which lists this (emphasis mine):
|
gaming-hacker
commented
Apr 14, 2018
Ah thanks, i use source tree as a gui to display the status of the commits and it shows these as unmerged, i'll report a bug to source tree. |


The following submodules have been updated for a new version of LLVM:
src/llvmsrc/libcompiler_builtins- transitively contains compiler-rtsrc/dlmallocThis 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 and have at this
point forgotten what most of them are for. Instead I started from the current
release_60branch in LLVM and only applied patches that were necessary to getour tests working and building.
The current set of custom rustc-specific patches included in this LLVM update are:
cfg(target_feature)for now and continues to not be upstreamed. While ahazard for SIMD stabilization this commit is otherwise keeping the status
quo of a small rustc-specific feature.
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.
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
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.
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) 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, another change to pass manager
order, some compile fixes for
sparc, and some fixes for
solaris.
The update to LLVM 6 is desirable for a number of reasons, notably:
features as they start landing.
especially around AVX-512 and such.
in the LLVM 4 branch we're using.
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
Closesrust-lang/stdarch#157
Closes rust-lang-nursery/rust-wasm#3