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

Rollup of 8 pull requests #83861

Closed
wants to merge 22 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tspiteri and others added 22 commits March 29, 2021 18:33
Now the family name is Source Serif 4 (upstream issue 77) instead of
Source Serif Pro.
This is step 2 towards fixing rust-lang#77548.

In the codegen and codegen-units test suites, the `//` comment markers
were kept in order not to affect any source locations. This is because
these tests cannot be automatically `--bless`ed.
Co-authored-by: Yuki Okushi <jtitor@2k36.org>
Previously registers could only be marked as clobbered if the target feature for that register was enabled. This restriction is now removed.
Co-authored-by: kennytm <kennytm@gmail.com>
wasm64 support

There is still some upstream llvm work needed before this can land.
core: disable `ptr::swap_nonoverlapping_one`'s block optimization on SPIR-V.

SPIR-V primarily supports what it calls the "Logical addressing model" (and AFAIK for graphical shaders it's the only option), and what that implies is that there is no "memory" to uniformly address at some byte/word level, and that you can't really talk about values having a "raw representation" in terms of sequences of bytes. Therefore, the "block"-wise swapping optimization employed by `ptr::swap_nonoverlapping_one` (where a "block" is 32 bytes, currently), is fundamentally incompatible with SPIR-V "memory".

As such, [Rust-GPU](https://github.com/EmbarkStudios/rust-gpu/)'s `rustc_codegen_spirv` backend cannot currently allow the use of `ptr::swap_nonoverlapping_one` - but that comes at a great price, since it's the building block of `mem::{swap,replace}`, and those in turn are used by e.g. `Option::take` and `Range`'s `Iterator` implementation (the latter blocking the use of `for i in 0..n` loops).

There's 4 options I can see in terms of supporting `ptr::swap_nonoverlapping_one` in `rustc_codegen_spirv`:
* legalize the block-wise swap loop back into swapping whole values, for SPIR-V
  * this is made borderline impossible by the fact that the size of the state "on the stack" is a block, and has to be expanded back to the appropriate size of the value being swapped, so in practice this would have to effectively pattern-match on the exact shape of the block-wise swapping algorithm, as a roundabout way of "patching `core::ptr` on the fly"
* (**this PR**) disable the block-wise swap optimization altogether when `#[cfg(target_arch = "spirv")`
  * I've tested it and it does in fact allow compiling `for i in 0..n` loops, which was my primary motivation
  * main downside IMO is the fact that `core` now acknowledges an out-of-tree backend
    * as a counterpoint, any attempt to compile Rust to SPIR-V would run into this problem, one way or another
* only enable the block-wise swap optimization on targets where it's been empirically proven to be an improvement
  * would avoid any surprises in terms of potentially-broken/inefficient codegen, in general
  * however, it may be universally applicable (thanks to caches), even if the optimal block size could differ
* move low-level swapping into an intrinsic, where the backend can choose any optimization approach it wants
  * this also has an impact on MIR optimizations (cc `@rust-lang/wg-mir-opt)` - which currently cannot hope to make sense of e.g. `Option::take` despite it being effectively `_0 = *_1;` `*_1 = None;` `return;`
  * long-term this is my preferred approach, and I can start working on it if that's desired, but I wanted to confirm that this swapping optimization is the final blocker for [Rust-GPU](https://github.com/EmbarkStudios/rust-gpu/) supporting e.g. range `for` loops

r? `@nagisa` cc `@rust-lang/libs`
…eGomez

Update Source Serif to release 4.004

Now the family name is Source Serif 4 (upstream issue 77) instead of Source Serif Pro.
…llaumeGomez

rustdoc: Separate filter-empty-string out into its own function
…ions, r=Mark-Simulacrum

Tests: Remove redundant `ignore-tidy-linelength` annotations

This is step 2 towards fixing rust-lang#77548.

In the codegen and codegen-units test suites, the `//` comment markers
were kept in order not to affect any source locations. This is because
these tests cannot be automatically `--bless`ed.
ptr::addr_of documentation improvements

While writing rust-lang/reference#1001 I figured I could also improve the docs here a bit.
Remove attribute `#[link_args]`

Closes rust-lang#29596

The attribute could always be replaced with `-C link-arg`, but cargo didn't provide a reasonable way to pass such flags to rustc.
Now cargo supports `cargo:rustc-link-arg*` directives in build scripts (https://doc.rust-lang.org/cargo/reference/unstable.html#extra-link-arg), so this attribute can be removed.
Allow clobbering unsupported registers in asm!

Previously registers could only be marked as clobbered if the target feature for that register was enabled. This restriction is now removed.

cc rust-lang#81092

r? `@nagisa`
@rustbot rustbot added the rollup A PR which is a rollup label Apr 4, 2021
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 4, 2021

📌 Commit 78ae63b has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 4, 2021
@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
.................................................................................................... 9400/11731
.................................................................................................... 9500/11731
........................................................................i......i.................... 9600/11731
.................................................................................................... 9700/11731
..................iiiiiii..iiiiii.i................................................................. 9800/11731
.................................................................................................... 10000/11731
.................................................................................................... 10100/11731
.................................................................................................... 10200/11731
.................................................................................................... 10300/11731
---
Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 31 tests
iiiiiiiiiiiiiiiiiiiiiiiiiiiii..
test result: ok. 2 passed; 0 failed; 29 ignored; 0 measured; 0 filtered out; finished in 0.04s

 finished in 0.094 seconds
Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 116 tests
iiiiiiiiii.i.i..i..i..ii....i.i....ii..........iiii.........i.....i...i.......ii.i.ii.....iiii.....i 100/116
test result: ok. 78 passed; 0 failed; 38 ignored; 0 measured; 0 filtered out; finished in 2.39s

 finished in 2.443 seconds
Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
---
Suite("src/test/run-make") not skipped for "bootstrap::test::RunMake" -- not in ["src/tools/tidy"]
Check compiletest suite=run-make mode=run-make (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 23 tests
Some tests failed in compiletest suite=run-make mode=run-make host=x86_64-unknown-linux-gnu target=x86_64-unknown-linux-gnu
iiiiiiiiiiii..........F

---- [run-make] run-make/emit-shared-files stdout ----

error: make failed
error: make failed
status: exit status: 2
command: "make"
stdout:
------------------------------------------
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc' -L /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib -Z unstable-options --emit=invocation-specific --output /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only --resource-suffix=-xxx --theme y.css --extend-css z.css x.rs
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/search-index-xxx.js ]
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/settings.html ]
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/x/all.html ]
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/x/index.html ]
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/theme-xxx.css ] # generated from z.css
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/storage-xxx.js ]
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/SourceSerifPro-It.ttf.woff ]
# FIXME: this probably shouldn't have a suffix
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/y-xxx.css ]
# FIXME: this is technically incorrect (see `write_shared`)
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/invocation-only/main-xxx.js ]
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc' -L /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib -Z unstable-options --emit=toolchain-shared-resources --output /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only --resource-suffix=-xxx --extend-css z.css x.rs
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only/storage-xxx.js ]
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only/SourceSerifPro-It.ttf.woff ]
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only/search-index-xxx.js ]
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only/x/index.html ]
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only/theme.css ]
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only/main-xxx.js ]
! [ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/toolchain-only/y-xxx.css ]
LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc' -L /checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib -Z unstable-options --emit=toolchain-shared-resources,unversioned-shared-resources --output /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/all-shared --resource-suffix=-xxx --extend-css z.css x.rs
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/all-shared/storage-xxx.js ]
[ -e /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make/emit-shared-files/emit-shared-files/all-shared/SourceSerifPro-It.ttf.woff ]
Makefile:36: recipe for target 'all-shared' failed
------------------------------------------
stderr:
------------------------------------------
------------------------------------------
warning: theme file "y.css" is missing CSS rules from the default theme
  |
  = warning: the theme may appear incorrect when loaded
  = help: to see what rules are missing, call `rustdoc  --check-theme "y.css"`

make: *** [all-shared] Error 1
------------------------------------------




failures:
    [run-make] run-make/emit-shared-files

test result: FAILED. 10 passed; 1 failed; 12 ignored; 0 measured; 0 filtered out; finished in 2.80s



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" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/run-make" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--suite" "run-make" "--mode" "run-make" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-10/bin/FileCheck" "--nodejs" "/usr/bin/node" "--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" "--quiet" "--llvm-version" "10.0.0" "--llvm-components" "aarch64 aarch64asmparser aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitstreamreader bitwriter bpf bpfasmparser bpfcodegen bpfdesc bpfdisassembler bpfinfo cfguard codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfogsym debuginfomsf debuginfopdb demangle dlltooldriver dwarflinker engine executionengine frontendopenmp fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader jitlink lanai lanaiasmparser lanaicodegen lanaidesc lanaidisassembler lanaiinfo 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 perfjitevents 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 textapi transformutils vectorize webassembly webassemblyasmparser webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86codegen x86desc x86disassembler x86info x86utils xcore xcorecodegen xcoredesc xcoredisassembler xcoreinfo xray" "--system-llvm" "--llvm-bin-dir" "/usr/lib/llvm-10/bin" "--cc" "cc" "--cxx" "c++" "--cflags" "-ffunction-sections -fdata-sections -fPIC -m64" "--ar" "ar" "--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 --exclude src/tools/tidy
Build completed unsuccessfully in 0:30:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup 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.