Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to LLVM 11.0.1 #80796

Merged
merged 2 commits into from
Jan 13, 2021
Merged

Update to LLVM 11.0.1 #80796

merged 2 commits into from
Jan 13, 2021

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Jan 7, 2021

This updates to a new LLVM branch, rebased on the upstream llvmorg-11.0.1. All our patches applied cleanly except the fortanix unwind changes, which just needed a small adjustment in cmake files.

r? @nikic
Fixes #73722

@rust-highfive
Copy link
Collaborator

⚠️ Warning ⚠️

  • These commits modify submodules.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 7, 2021
@nikic
Copy link
Contributor

nikic commented Jan 7, 2021

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Jan 7, 2021

📌 Commit c1d9423 has been approved by nikic

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 7, 2021
@bors
Copy link
Contributor

bors commented Jan 9, 2021

⌛ Testing commit c1d9423 with merge 3b49a39fd2d0e933e23d2a0a6e1d6e1baf56e27a...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

------------------------------------------
stderr:
------------------------------------------
thread 'main' panicked at 'assertion failed: voidret1 as extern fn() != voidret2 as extern fn()', /checkout/src/test/ui/extern/extern-compare-with-return-type.rs:17:5

------------------------------------------


---

Some tests failed in compiletest suite=ui mode=ui host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "ui" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python3" "--lldb-python" "/usr/bin/python3" "--gdb" "/usr/bin/gdb" "--llvm-version" "11.0.1-rust-1.51.0-nightly" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine extensions frontendopenmp fuzzmutate globalisel gtest gtest_main hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink libdriver lineeditor linker lto mc mca mcdisassembler mcjit mcparser mips mipsasmparser mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmparser msp430codegen msp430desc msp430disassembler msp430info native nativecodegen nvptx nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcerror orcjit passes powerpc powerpcasmparser powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata remarks riscv riscvasmparser riscvcodegen riscvdesc riscvdisassembler riscvinfo riscvutils runtimedyld scalaropts selectiondag sparc sparcasmparser sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target testingsupport textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info xray" "--cc" "" "--cxx" "" "--cflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test
Build completed unsuccessfully in 0:21:08

@bors
Copy link
Contributor

bors commented Jan 9, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 9, 2021
@nikic
Copy link
Contributor

nikic commented Jan 9, 2021

This assertion fails:

assert!(voidret1 as extern fn() != voidret2 as extern fn());

At a guess, maybe those functions got merged and thus have the same address? Do Rust semantics require that distinct functions have distinct addresses?

@nikic
Copy link
Contributor

nikic commented Jan 9, 2021

Change probably caused by llvm/llvm-project@38399ce, which removes the assumption that distinct unnamed_addr globals have different addresses (as they may be merged).

@nagisa
Copy link
Member

nagisa commented Jan 9, 2021

At a guess, maybe those functions got merged and thus have the same address? Do Rust semantics require that distinct functions have distinct addresses?

There is no such requirement, no. This assertion is bogus.

@cuviper
Copy link
Member Author

cuviper commented Jan 11, 2021

Change probably caused by llvm/llvm-project@38399ce, which removes the assumption that distinct unnamed_addr globals have different addresses (as they may be merged).

This fixed bug 47090, filed by @RalfJung. (cc #73722)

I've added dbg!() to ensure those functions are different (via line number), but I can remove that assertion if you'd rather.

@nikic
Copy link
Contributor

nikic commented Jan 11, 2021

Making the functions different seems fine to me.

@bors r+

@bors
Copy link
Contributor

bors commented Jan 11, 2021

📌 Commit 9756838 has been approved by nikic

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 11, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 13, 2021
Rollup of 10 pull requests

Successful merges:

 - rust-lang#78901 (diagnostics: Note capturing closures can't be coerced to fns)
 - rust-lang#79588 (Provide more information for HRTB lifetime errors involving closures)
 - rust-lang#80232 (Remove redundant def_id lookups)
 - rust-lang#80662 (Added support for i386-unknown-linux-gnu and i486-unknown-linux-gnu)
 - rust-lang#80736 (use Once instead of Mutex to manage capture resolution)
 - rust-lang#80796 (Update to LLVM 11.0.1)
 - rust-lang#80859 (Fix --pretty=expanded with --remap-path-prefix)
 - rust-lang#80922 (Revert "Auto merge of rust-lang#76896 - spastorino:codegen-inline-fns2)
 - rust-lang#80924 (Fix rustdoc --test-builder argument parsing)
 - rust-lang#80935 (Rename `rustc_middle::lint::LevelSource` to `LevelAndSource`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 330e196 into rust-lang:master Jan 13, 2021
@rustbot rustbot added this to the 1.51.0 milestone Jan 13, 2021
bors pushed a commit to rust-lang-ci/rust that referenced this pull request Jan 20, 2021
Original message:
Rollup merge of rust-lang#80796 - cuviper:llvm-11.0.1, r=nikic

Update to LLVM 11.0.1

This updates to a new LLVM branch, rebased on the upstream `llvmorg-11.0.1`. All our patches applied cleanly except the fortanix unwind changes, which just needed a small adjustment in cmake files.

r? `@nikic`
Fixes rust-lang#73722
@rylev
Copy link
Member

rylev commented Jan 26, 2021

@cuviper It does seem that this PR was responsible for the perf regressions in the rollup where it was merged (#80960) as can be seen here in #81207. I'm guessing it's probably not worth actually addressing this, but we might want to get in the habit of doing perf runs when upgrading LLVM. Thoughts?

@nikic
Copy link
Contributor

nikic commented Jan 26, 2021

Huh, I didn't expect this to happen for a patch version bump. Those are some pretty huge changes. The fact that the main impact is on check builds implies that rustc itself is being optimized worse, in a fairly significant way.

@Mark-Simulacrum
Copy link
Member

More broadly, we should definitely not be rolling up LLVM bumps I think.

@nikic
Copy link
Contributor

nikic commented Jan 26, 2021

Though possibly I'm misunderstanding the results. Is the link at #81207 meaningful, or should I be looking at https://perf.rust-lang.org/compare.html?start=058a71016553f267ae80b90276ef79956457d51a&end=3ab423f5ac44d394fb4d47db2b4042b4a25e8b1d&stat=instructions%3Au instead (which looks about neutral)?

@cuviper
Copy link
Member Author

cuviper commented Jan 26, 2021

Yeah, it's surprising that a patch release had such impact. We can make a point of separating these from rollups though, sure.

@Mark-Simulacrum
Copy link
Member

That said, I think the performance results are unlikely to be due to this PR - the rust-timer generated perf test PR seems to be buggy, as it includes more than just this PR's changes. I've filed rust-lang/rustc-perf#832 to track that.

I think it is plausible there were some LLVM regressions, but the regex regression in the rollup's merge results are likely due to #80922 (Revert "Auto merge of #76896 - spastorino:codegen-inline-fns2) which specifically reverted debug-related codegen changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid equality check result for usizes obtained from function pointers
9 participants