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 #96083

Closed
wants to merge 21 commits into from
Closed

Conversation

RalfJung
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

dtolnay and others added 21 commits March 15, 2022 17:56
All other ABIs are left unstable for now.

cc rust-lang#64926
A more robust solution to finding where to place use suggestions was added.
The algorithm uses the AST to find the span for the suggestion so we pass this span
down to the HIR during lowering and use it.

Signed-off-by: Miguel Guarniz <mi9uel9@gmail.com>
Since September, the toolchain has not been generating reliable DWARF
information for static variables when LTO is on. This has affected
projects in the embedded space where the use of LTO is typical. In our
case, it has kept us from bumping past the 2021-09-22 nightly toolchain
lest our debugger break. This has been a pretty dramatic regression for
people using debuggers and static variables. See rust-lang#90357 for more info
and a repro case.

This commit is a mechanical revert of
d5de680 from PR rust-lang#89041, which caused
the issue. (Note on that PR that the commit's author has requested it be
reverted.)

I have locally verified that this fixes rust-lang#90357 by restoring the
functionality of both the repro case I posted on that bug, and debugger
behavior on real programs. There do not appear to be test cases for this
in the toolchain; if I've missed them, point me at 'em and I'll update
them.
- Re-enabled basic-types-globals which has been disabled since 2018
- Updated its now-rotted assertions about GDB's output to pass
- Rewrote header comment describing some previous state of GDB behavior
  that didn't match either the checked-in assertions _or_ the current
  behavior, and so I assume has just been wrong for some time.
- Copy-pasta'd the test into a version that uses LTO to check for
  regression on rust-lang#90357, because I don't see a way to matrix the same
  test into several build configurations.
…pnkfelix

Only add codegen backend to dep info if -Zbinary-dep-depinfo is used

I am currently migrating the cg_clif build system from using a binary linked to the codegen backend as rustc replacement to passing `-Zcodegen-backend` instead. Without this PR this would force cargo to rebuild the sysroot on any change to the codegen backend even if I explicitly specify that I want it to be preserved, which would make development of cg_clif a lot slower. If you still want to have changes to the codegen backend invalidate the cargo build cache you can explicitly specify `-Zbinary-dep-depinfo`.

cc ````@eddyb```` as the codegen backend was initially added to the depinfo for rust-gpu.
Parse inner attributes on inline const block

According to rust-lang#84414 (comment), inner attributes are intended to be supported *"in all containers for statements (or some subset of statements)"*.

This PR adds inner attribute parsing and pretty-printing for inline const blocks (rust-lang#76001), which contain statements just like an unsafe block or a loop body.

```rust
let _ = const {
    #![allow(...)]

    let x = ();
    x
};
```
…cement, r=pnkfelix

remove find_use_placement

A more robust solution to finding where to place use suggestions was added in rust-lang#94584.
The algorithm uses the AST to find the span for the suggestion so we pass this span
down to the HIR during lowering and use it instead of calling `find_use_placement`

Fixes rust-lang#94941
… r=pnkfelix

Stablize `const_extern_fn` for "Rust" and "C"

All other ABIs are left unstable for now.

cc rust-lang#64926
… r=pnkfelix

Revert "Work around invalid DWARF bugs for fat LTO"

Since September, the toolchain has not been generating reliable DWARF
information for static variables when LTO is on. This has affected
projects in the embedded space where the use of LTO is typical. In our
case, it has kept us from bumping past the 2021-09-22 nightly toolchain
lest our debugger break. This has been a pretty dramatic regression for
people using debuggers and static variables. See rust-lang#90357 for more info
and a repro case.

This commit is a mechanical revert of
d5de680 from PR rust-lang#89041, which caused
the issue. (Note on that PR that the commit's author has requested it be
reverted.)

I have locally verified that this fixes rust-lang#90357 by restoring the
functionality of both the repro case I posted on that bug, and debugger
behavior on real programs. There do not appear to be test cases for this
in the toolchain; if I've missed them, point me at 'em and I'll update
them.
…inline, r=oli-obk

Inline `shallow_resolve_ty` into `ShallowResolver`

addresses fixme I found in infcx
…ubilee

implement SIMD gather/scatter via vector getelementptr

Fixes rust-lang/portable-simd#271

However, I don't *really* know what I am doing here... Cc ```@workingjubilee``` ```@calebzulawski```

I didn't do anything for cranelift -- ```@bjorn3``` not sure if it's okay for that backend to temporarily break. I'm happy to cherry-pick a patch that adds cranelift support. :)
…ylan-DPC

couple of clippy::complexity fixes
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Apr 15, 2022
@RalfJung
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 15, 2022

📌 Commit 3f0504c has been approved by RalfJung

@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 15, 2022
@bors
Copy link
Contributor

bors commented Apr 15, 2022

⌛ Testing commit 3f0504c with merge aa8356c51d448f737d600a28ecde12a864fb238e...

@rust-log-analyzer
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Some tests failed in compiletest suite=codegen mode=codegen host=x86_64-unknown-linux-gnu target=i586-unknown-linux-gnu

failures:

---- [codegen] src/test/codegen/simd_arith_offset.rs stdout ----

error: verification with 'FileCheck' failed
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd_arith_offset/simd_arith_offset.ll" "/checkout/src/test/codegen/simd_arith_offset.rs" "--allow-unused-prefixes" "--check-prefixes" "CHECK,NONMSVC"
stdout: none
--- stderr -------------------------------
/checkout/src/test/codegen/simd_arith_offset.rs:23:12: error: CHECK: expected string not found in input
 // CHECK: getelementptr i8, <8 x i8*> %_3, <8 x i64> %_4
           ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd_arith_offset/simd_arith_offset.ll:7:19: note: scanning from here
define void @smoke(<8 x i8*>* noalias nocapture noundef sret(<8 x i8*>) dereferenceable(32) %0, <8 x i8*>* noalias nocapture noundef dereferenceable(32) %ptrs, <8 x i32>* noalias nocapture noundef dereferenceable(32) %offsets) unnamed_addr #0 {
                  ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd_arith_offset/simd_arith_offset.ll:11:7: note: possible intended match here
 %1 = getelementptr i8, <8 x i8*> %_3, <8 x i32> %_4


Input file: /checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/simd_arith_offset/simd_arith_offset.ll
Check file: /checkout/src/test/codegen/simd_arith_offset.rs

-dump-input=help explains the following input dump.
Input was:
<<<<<<
<<<<<<
            1: ; ModuleID = 'simd_arith_offset.2d137f9a-cgu.0' 
            2: source_filename = "simd_arith_offset.2d137f9a-cgu.0" 
            3: target datalayout = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128" 
            4: target triple = "i586-unknown-linux-gnu" 
            5:  
            6: ; Function Attrs: nonlazybind uwtable 
            7: define void @smoke(<8 x i8*>* noalias nocapture noundef sret(<8 x i8*>) dereferenceable(32) %0, <8 x i8*>* noalias nocapture noundef dereferenceable(32) %ptrs, <8 x i32>* noalias nocapture noundef dereferenceable(32) %offsets) unnamed_addr #0 { 
check:23'0                       X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
            8: start: 
check:23'0     ~~~~~~~
            9:  %_3 = load <8 x i8*>, <8 x i8*>* %ptrs, align 32 
check:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           10:  %_4 = load <8 x i32>, <8 x i32>* %offsets, align 32 
check:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           11:  %1 = getelementptr i8, <8 x i8*> %_3, <8 x i32> %_4 
check:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
check:23'1           ?                                               possible intended match
           12:  store <8 x i8*> %1, <8 x i8*>* %0, align 32 
check:23'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
           13:  br label %bb1 
check:23'0     ~~~~~~~~~~~~~~~
           14:  
check:23'0     ~
           15: bb1: ; preds = %start 
check:23'0     ~~~~~~~~~~~~~~~~~~~~~~
           16:  ret void 
check:23'0     ~~~~~~~~~~
            .
            .
>>>>>>
------------------------------------------

@bors
Copy link
Contributor

bors commented Apr 15, 2022

💔 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 Apr 15, 2022
@Dylan-DPC Dylan-DPC closed this Apr 15, 2022
@RalfJung RalfJung deleted the rollup-m8sa7o2 branch April 15, 2022 19:04
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-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.