Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upUpgrade to LLVM's master branch (LLVM 7) #51966
Conversation
rust-highfive
assigned
varkor
Jul 1, 2018
This comment has been minimized.
This comment has been minimized.
|
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
rust-highfive
added
the
S-waiting-on-review
label
Jul 1, 2018
This comment has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
|
Your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem. Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
alexcrichton
force-pushed the
alexcrichton:llvm7
branch
from
f440272
to
1f687f4
Jul 1, 2018
This comment was marked as resolved.
This comment was marked as resolved.
Oops. cc @jamesmunns |
This comment was marked as resolved.
This comment was marked as resolved.
|
Also CC @sekineh and @nerdyvaishali (they are working on the CI for these targets at the moment). @alexcrichton do you know if only
I can help test if you would like. We (embedded-wg) are still hoping to land |
This comment was marked as resolved.
This comment was marked as resolved.
|
@jamesmunns AFAIK it's just thumbv6m, although this is primarily just building libcore (not actually testing anything). I've verified that the other targets are able to compile libcore just fine and it's just the thumbv6m target that hits a bug. If y'all are familiar with LLVM though it may not be hard to fix! I'm not sure yet if we'll want to land this without that target, but I wanted to mostly get the conversation started! |
This comment was marked as resolved.
This comment was marked as resolved.
|
@jamesmunns a bisection of this bug points to https://reviews.llvm.org/D40922, although it may also not be the only issue blocking the thumbv6m target |
varkor
reviewed
Jul 2, 2018
| OptLevel::Less => "-O1", | ||
| OptLevel::Default => "-O2", | ||
| OptLevel::Aggressive => "-O3", | ||
| OptLevel::Size => "-O2", |
This comment has been minimized.
This comment has been minimized.
varkor
Jul 2, 2018
Member
If this is intentional, it'd be helpful to have a comment here to explain why -O2 is used for the size opt levels (as opposed to -Os and -Oz).
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Everything looks reasonable to me, but it'd be better to have someone more familiar check over this. |
rust-highfive
assigned
michaelwoerister
and unassigned
varkor
Jul 2, 2018
This comment was marked as resolved.
This comment was marked as resolved.
|
This: https://github.com/rust-lang/rust/blob/master/src/test/codegen/simd-intrinsic-float-minmax.rs#L37 Can be uncommented if the min-llvm-version on top is bumped to 7 as well. That fixes a bug in rustc and one in stdsimd. |
alexcrichton
force-pushed the
alexcrichton:llvm7
branch
2 times, most recently
from
abbd4fc
to
aa667e3
Jul 2, 2018
alexcrichton
force-pushed the
alexcrichton:llvm7
branch
2 times, most recently
from
1e57200
to
f29cd71
Jul 2, 2018
This comment has been minimized.
This comment has been minimized.
|
Now that https://bugs.llvm.org/show_bug.cgi?id=37382 is fixed I've updated to bring back the thumbv6m build |
This comment has been minimized.
This comment has been minimized.
|
Oh one thing I forgot to mention in the OP as well is that there's a change to |
This comment has been minimized.
This comment has been minimized.
|
@bors: try |
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jul 2, 2018
This comment was marked as resolved.
This comment was marked as resolved.
|
|
This comment was marked as resolved.
This comment was marked as resolved.
|
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
bors
added
S-waiting-on-author
and removed
S-waiting-on-review
labels
Jul 2, 2018
This comment has been minimized.
This comment has been minimized.
|
If I'm not mistaken, Clang/llvm 7 should release around september, which means it's going to release either right before rustc 1.29 is released, or right after. That's about the worst timing. So this bears the question: what about downstreams who build the rust compiler against a system llvm? As for the perf regressions, AIUI, they are compiling time regressions, that's not all that interesting. I mean, as @nnethercote mentioned, compilers tend to slow down with time, mainly because of better optimization. So the compile time regressions should be weighted against the performance of the generated code. And sometimes there are bad surprises there, too. |
This comment has been minimized.
This comment has been minimized.
|
This is not changing the minimum supported LLVM -- that was just bumped to LLVM 5 in #51899. |
bors
added a commit
that referenced
this pull request
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 42eb850
into
rust-lang:master
Jul 11, 2018
bors
added a commit
that referenced
this pull request
Jul 11, 2018
alexcrichton
deleted the
alexcrichton:llvm7
branch
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
|
Hm, this was a suspiciously smooth upgrade... |
This comment has been minimized.
This comment has been minimized.
|
Perf regressions showed up on perf.rust-lang.org as expected: Then there was a slight improvement immediately afterward due to #51230: |
glandium
referenced this pull request
Jul 12, 2018
Closed
panic code is not deterministically lto'ed #52044
bors
added a commit
that referenced
this pull request
Jul 12, 2018
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
Sure! |
alexcrichton commentedJul 1, 2018
•
edited
Current status
Blocked on a performance regression. The performance regression has an upstream LLVM issue and has also been bisected to an LLVM revision.Ready to merge!
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:
--gc-sectionstowasm-ldwasm-ld--stack-firstoption is passed to LLD to have stack overflow always causea trap instead of corrupting static data
wasm32-unknown-unknown.to reflect this.
Thethumbv6m-none-eabitarget is disabled due to an LLVM bugNowadays 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.
cc #50543