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

Sync from rust 2023/08/12 #313

Merged
merged 38 commits into from
Aug 15, 2023
Merged

Sync from rust 2023/08/12 #313

merged 38 commits into from
Aug 15, 2023

Commits on Jun 9, 2023

  1. Configuration menu
    Copy the full SHA
    9176f51 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Configuration menu
    Copy the full SHA
    ec10051 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2023

  1. Configuration menu
    Copy the full SHA
    42ecb50 View commit details
    Browse the repository at this point in the history
  2. Auto merge of #100036 - DrMeepster:box_free_free_box, r=oli-obk

    Remove `box_free` lang item
    
    This PR removes the `box_free` lang item, replacing it with `Box`'s `Drop` impl. Box dropping is still slightly magic because the contained value is still dropped by the compiler.
    bors committed Jun 17, 2023
    Configuration menu
    Copy the full SHA
    876a7d8 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2023

  1. Configuration menu
    Copy the full SHA
    38c16e9 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2023

  1. Update Cargo.lock

    antoyo committed Jun 20, 2023
    Configuration menu
    Copy the full SHA
    3dd0699 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of #112499 - tgross35:py-ruff-fixes, r=Mark-Simulacrum

    Fix python linting errors
    
    These were flagged by `ruff`, run using the config in rust-lang/rust#112482
    compiler-errors authored Jun 20, 2023
    Configuration menu
    Copy the full SHA
    ab1e4bb View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. Auto merge of #112814 - antoyo:sync-cg_gcc-2023-06-19, r=bjorn3

    Sync rustc_codegen_gcc 2023/06/19
    
    Hi.
    This is a sync of the rustc_codegen_gcc subtree.
    Thanks.
    bors committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    ac79ddb View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. Narrow trait CoverageInfoBuilderMethods down to just one method

    This effectively inlines most of `FunctionCx::codegen_coverage` into the LLVM
    implementation of `CoverageInfoBuilderMethods`.
    Zalathar committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    d710bee View commit details
    Browse the repository at this point in the history
  2. Remove trait CoverageInfoMethods, since non-LLVM backends don't nee…

    …d it
    
    These methods are only ever called from within `rustc_codegen_llvm`, so they
    can just be declared there as well.
    Zalathar committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    744d05c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    761324d View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2023

  1. Configuration menu
    Copy the full SHA
    d873fa7 View commit details
    Browse the repository at this point in the history

Commits on Jul 16, 2023

  1. rustc_llvm: Add a -Z print-llvm-stats option to expose LLVM statist…

    …ics.
    
    LLVM has a neat [statistics] feature that tracks how often optimizations kick
    in. It's very handy for optimization work. Since we expose the LLVM pass
    timings, I thought it made sense to expose the LLVM statistics too.
    
    [statistics]: https://llvm.org/docs/ProgrammersManual.html#the-statistic-class-stats-option
    pcwalton authored and khei4 committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    2c0c87d View commit details
    Browse the repository at this point in the history
  2. Introduce MonoItemData.

    It replaces `(Linkage, Visibility)`, making the code nicer. Plus the
    next commit will add another field.
    nnethercote committed Jul 16, 2023
    Configuration menu
    Copy the full SHA
    4bebfae View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2023

  1. Configuration menu
    Copy the full SHA
    5277ea1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f2dded2 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. UPDATE - replace gcc monomorphization errors with ssa ones

    Reduces error duplication and makes it more consistent across backends
    JhonnyBillM committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    5f56f49 View commit details
    Browse the repository at this point in the history
  2. UPDATE - replace expected_simd error with one from codegen_ssa

    Here I am assuming we want to treat these parameters (input, first, second, third, return) as translatable
    JhonnyBillM committed Jul 20, 2023
    Configuration menu
    Copy the full SHA
    f746fe1 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2023

  1. Configuration menu
    Copy the full SHA
    1984e20 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of #113723 - khei4:khei4/llvm-stats, r=oli-obk,nikic

    Resurrect: rustc_llvm: Add a -Z `print-codegen-stats` option to expose LLVM statistics.
    
    This resurrects PR rust-lang/rust#104000, which has sat idle for a while. And I want to see the effect of stack-move optimizations on LLVM (like https://reviews.llvm.org/D153453) :).
    
    I have applied the changes requested by `@oli-obk` and `@nagisa`  rust-lang/rust#104000 (comment) and rust-lang/rust#104000 (comment) in the latest commits.
    
    r? `@oli-obk`
    
    -----
    
    LLVM has a neat [statistics](https://llvm.org/docs/ProgrammersManual.html#the-statistic-class-stats-option) feature that tracks how often optimizations kick in. It's very handy for optimization work. Since we expose the LLVM pass timings, I thought it made sense to expose the LLVM statistics too.
    
    -----
    (Edit: fix broken link
    (Edit2: fix segmentation fault and use malloc
    
    If `rustc` is built with
    ```toml
    [llvm]
    assertions = true
    ```
    Then you can see like
    ```
    rustc +stage1 -Z print-codegen-stats -C opt-level=3  tmp.rs
    ===-------------------------------------------------------------------------===
                              ... Statistics Collected ...
    ===-------------------------------------------------------------------------===
             3 aa                           - Number of MayAlias results
           193 aa                           - Number of MustAlias results
           531 aa                           - Number of NoAlias results
    ...
    ```
    
    And the current default build emits only
    ```
    $ rustc +stage1 -Z print-codegen-stats -C opt-level=3  tmp.rs
    ===-------------------------------------------------------------------------===
                              ... Statistics Collected ...
    ===-------------------------------------------------------------------------===
    $
    ```
    This might be better to emit the message to tell assertion flag necessity, but now I can't find how to do that...
    matthiaskrgr authored Jul 21, 2023
    Configuration menu
    Copy the full SHA
    c022c81 View commit details
    Browse the repository at this point in the history
  3. Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk

    Prototype: Add unstable `-Z reference-niches` option
    
    MCP: rust-lang/compiler-team#641
    Relevant RFC: rust-lang/rfcs#3204
    
    This prototype adds a new `-Z reference-niches` option, controlling the range of valid bit-patterns for reference types (`&T` and `&mut T`), thereby enabling new enum niching opportunities. Like `-Z randomize-layout`, this setting is crate-local; as such, references to built-in types (primitives, tuples, ...) are not affected.
    
    The possible settings are (here, `MAX` denotes the all-1 bit-pattern):
    | `-Z reference-niches=` | Valid range |
    |:---:|:---:|
    | `null` (the default) | `1..=MAX` |
    | `size` | `1..=(MAX- size)` |
    | `align` | `align..=MAX.align_down_to(align)` |
    | `size,align` | `align..=(MAX-size).align_down_to(align)` |
    
    ------
    
    This is very WIP, and I'm not sure the approach I've taken here is the best one, but stage 1 tests pass locally; I believe this is in a good enough state to unleash this upon unsuspecting 3rd-party code, and see what breaks.
    bors committed Jul 21, 2023
    Configuration menu
    Copy the full SHA
    e865542 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2023

  1. Revert "Auto merge of #113166 - moulins:ref-niches-initial, r=oli-obk"

    This reverts commit 557359f92512ca88b62a602ebda291f17a953002, reversing
    changes made to 1e6c09a803fd543a98bfbe1624d697a55300a786.
    dtolnay committed Jul 22, 2023
    Configuration menu
    Copy the full SHA
    e2a8474 View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2023

  1. Auto merge of #113877 - JhonnyBillM:reuse-codegen-ssa-monomorphizatio…

    …n-errors-in-gcc, r=davidtwco
    
    Reuse `codegen_ssa` monomorphization errors in `codegen_gcc`
    
    Removes monomorphization errors duplication by reusing the ones defined in `codegen_ssa`.
    
    Also updates `expected_simd` errors usage in `codegen_gcc` by assuming we want to treat those parameters as translatable. See rust-lang/rust@7a888fb
    bors committed Jul 24, 2023
    Configuration menu
    Copy the full SHA
    9e58bac View commit details
    Browse the repository at this point in the history

Commits on Jul 29, 2023

  1. Configuration menu
    Copy the full SHA
    bc4a65d View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2023

  1. Configuration menu
    Copy the full SHA
    e94abcd View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2023

  1. Auto merge of #105545 - erikdesjardins:ptrclean, r=bjorn3

    cleanup: remove pointee types
    
    This can't be merged until the oldest LLVM version we support uses opaque pointers, which will be the case after #114148. (Also note `-Cllvm-args="-opaque-pointers=0"` can technically be used in LLVM 15, though I don't think we should support that configuration.)
    
    I initially hoped this would provide some minor perf win, but in rust-lang/rust#105412 (comment) it had very little impact, so this is only valuable as a cleanup.
    
    As a followup, this will enable #96242 to be resolved.
    
    r? `@ghost`
    
    `@rustbot` label S-blocked
    bors committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    3cde194 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2023

  1. Configuration menu
    Copy the full SHA
    de69c67 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2023

  1. Configuration menu
    Copy the full SHA
    46062cd View commit details
    Browse the repository at this point in the history
  2. Rollup merge of #114450 - chenyukang:yukang-fix-114435, r=compiler-er…

    …rors
    
    Fix ICE failed to get layout for ReferencesError
    
    Fixes #114435
    
    r? `@compiler-errors`
    matthiaskrgr authored Aug 4, 2023
    Configuration menu
    Copy the full SHA
    7ebcd4d View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2023

  1. Configuration menu
    Copy the full SHA
    fe6a477 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9c8ae2f View commit details
    Browse the repository at this point in the history
  3. Apply suggestions from code review

    Co-authored-by: Ralf Jung <[email protected]>
    scottmcm and RalfJung committed Aug 6, 2023
    Configuration menu
    Copy the full SHA
    b132a7e View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2023

  1. Rollup merge of #114382 - scottmcm:compare-bytes-intrinsic, r=cjgillot

    Add a new `compare_bytes` intrinsic instead of calling `memcmp` directly
    
    As discussed in #113435, this lets the backends be the place that can have the "don't call the function if n == 0" logic, if it's needed for the target.  (I didn't actually *add* those checks, though, since as I understood it we didn't actually need them on known targets?)
    
    Doing this also let me make it `const` (unstable), which I don't think `extern "C" fn memcmp` can be.
    
    cc `@RalfJung` `@Amanieu`
    matthiaskrgr authored Aug 7, 2023
    Configuration menu
    Copy the full SHA
    8a160d6 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2023

  1. Update to nightly-2023-08-12

    antoyo committed Aug 13, 2023
    Configuration menu
    Copy the full SHA
    43431e4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    607ec89 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2023

  1. Fix tests

    antoyo committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    e3deac5 View commit details
    Browse the repository at this point in the history
  2. Fix for libgccjit 12

    antoyo committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    542c82e View commit details
    Browse the repository at this point in the history
  3. Fix tests

    antoyo committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    53d89e8 View commit details
    Browse the repository at this point in the history