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 rustc_codegen_cranelift #116556

Merged
merged 85 commits into from
Oct 9, 2023
Merged

Commits on Sep 5, 2023

  1. Remove special handling in codegen for some SSE2 "storeu" intrinsics

    Those were removed from stdarch in rust-lang/stdarch#1463 (`<*mut _>::write_unaligned` is used instead)
    eduardosm committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    9f562f2 View commit details
    Browse the repository at this point in the history
  2. Remove special handling in codegen for some AVX and SSE2 shift by imm…

    …ediate intrinsics
    
    Those were removed from stdarch in rust-lang/stdarch#1463 (`simd_shl` and `simd_shr` are used instead)
    eduardosm committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    4cd5177 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2023

  1. Configuration menu
    Copy the full SHA
    f2211c5 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#115580 - eduardosm:stdarch-intrinsics, r=davi…

    …dtwco,bjorn3
    
    Update stdarch submodule and remove special handling in cranelift codegen for some AVX and SSE2 LLVM intrinsics
    
    rust-lang/stdarch#1463 reimplemented some x86 intrinsics to avoid using some x86-specific LLVM intrinsics:
    
    * Store unaligned (`_mm*_storeu_*`) use `<*mut _>::write_unaligned` instead of `llvm.x86.*.storeu.*`.
    * Shift by immediate (`_mm*_s{ll,rl,ra}i_epi*`) use `if` (srl, sll) or `min` (sra) to simulate the behaviour when the RHS is out of range. RHS is constant, so the `if`/`min` will be optimized away.
    
    This PR updates the stdarch submodule to pull these changes and removes special handling for those LLVM intrinsics from cranelift codegen. I left gcc codegen untouched because there are some autogenerated lists.
    bors committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    d4f12a5 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Auto merge of rust-lang#115616 - bjorn3:sync_cg_clif-2023-09-06, r=bj…

    …orn3
    
    Sync rustc_codegen_cranelift
    
    Not much changed this time. Mostly doing this sync to make it easier to run the entire test suite on the in-tree version.
    
    r? `@ghost`
    
    `@rustbot` label +A-codegen +A-cranelift +T-compiler
    bors committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    6285086 View commit details
    Browse the repository at this point in the history
  2. Use Freeze for SourceFile.lines

    Zoxc committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    4ecfd30 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'sync_from_rust'

    bjorn3 committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    28f12f0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5ae94e9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d72f710 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Auto merge of rust-lang#115418 - Zoxc:freeze-source, r=oli-obk

    Use `Freeze` for `SourceFile`
    
    This uses the `Freeze` type in `SourceFile` to let accessing `external_src` and `lines` be lock-free.
    
    Behavior of `add_external_src` is changed to set `ExternalSourceKind::AbsentErr` on a hash mismatch which matches the documentation. `ExternalSourceKind::Unneeded` was removed as it's unused.
    
    Based on rust-lang#115401.
    bors committed Sep 8, 2023
    Configuration menu
    Copy the full SHA
    c41e779 View commit details
    Browse the repository at this point in the history

Commits on Sep 10, 2023

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

Commits on Sep 12, 2023

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

Commits on Sep 13, 2023

  1. Configuration menu
    Copy the full SHA
    8e6f68b View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#115736 - Zoxc:time-cleanup, r=wesleywiser

    Remove `verbose_generic_activity_with_arg`
    
    This removes `verbose_generic_activity_with_arg` and changes users to `generic_activity_with_arg`. This keeps the output of `-Z time` readable while these repeated events are still available with the self profiling mechanism.
    matthiaskrgr authored Sep 13, 2023
    Configuration menu
    Copy the full SHA
    9475cdb View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#115798 - RalfJung:non_1zst_field, r=wesleyw…

    …iser
    
    add helper method for finding the one non-1-ZST field
    matthiaskrgr authored Sep 13, 2023
    Configuration menu
    Copy the full SHA
    1956fb8 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2023

  1. Configuration menu
    Copy the full SHA
    d1ea699 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a5b81fa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    90d894e View commit details
    Browse the repository at this point in the history
  4. Sync from rust 8142a31

    bjorn3 committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    214d474 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b67a1c4 View commit details
    Browse the repository at this point in the history
  6. Fix rustc test suite

    bjorn3 committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    aab17cc View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    d8c1393 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    02e5f38 View commit details
    Browse the repository at this point in the history
  9. organize import sections with rustfmt group_imports

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan authored and bjorn3 committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    e048674 View commit details
    Browse the repository at this point in the history
  10. Merge pull request rust-lang#1393 from onur-ozkan/rustfmt-group-imports

    organize import sections with rustfmt `group_imports`
    bjorn3 authored Sep 14, 2023
    Configuration menu
    Copy the full SHA
    5c7a87c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3113fef View commit details
    Browse the repository at this point in the history
  12. don't point at const usage site for resolution-time errors

    also share the code that emits the actual error
    RalfJung committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    b7cc765 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2023

  1. Configuration menu
    Copy the full SHA
    89f0d18 View commit details
    Browse the repository at this point in the history
  2. fix gcc, cranelift build

    RalfJung committed Sep 15, 2023
    Configuration menu
    Copy the full SHA
    f9f8bff View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2023

  1. Update some dependencies

    bjorn3 committed Sep 16, 2023
    Configuration menu
    Copy the full SHA
    fbb276e View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. Configuration menu
    Copy the full SHA
    6fd5dc8 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#115748 - RalfJung:post-mono, r=oli-obk

    move required_consts check to general post-mono-check function
    
    This factors some code that is common between the interpreter and the codegen backends into shared helper functions. Also as a side-effect the interpreter now uses the same `eval` functions as everyone else to get the evaluated MIR constants.
    
    Also this is in preparation for another post-mono check that will be needed for (the current hackfix for) rust-lang#115709: ensuring that all locals are dynamically sized.
    
    I didn't expect this to change diagnostics, but it's just cycle errors that change.
    
    r? `@oli-obk`
    bors committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    46b55ae View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2023

  1. move ConstValue into mir

    this way we have mir::ConstValue and ty::ValTree as reasonably parallel
    RalfJung committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    247d38d View commit details
    Browse the repository at this point in the history
  2. Sync from rust 65ea825

    bjorn3 committed Sep 19, 2023
    Configuration menu
    Copy the full SHA
    5f3b867 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    baee5ce View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9b855a9 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    dd48b5e View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2023

  1. Configuration menu
    Copy the full SHA
    0e02cab View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#115972 - RalfJung:const-consistency, r=oli-obk

    rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const
    
    Also, be more consistent with the `to/eval_bits` methods... we had some that take a type and some that take a size, and then sometimes the one that takes a type is called `bits_for_ty`.
    
    Turns out that `ty::Const`/`mir::ConstKind` carry their type with them, so we don't need to even pass the type to those `eval_bits` functions at all.
    
    However this is not properly consistent yet: in `ty` we have most of the methods on `ty::Const`, but in `mir` we have them on `mir::ConstKind`. And indeed those two types are the ones that correspond to each other. So `mir::ConstantKind` should actually be renamed to `mir::Const`. But what to do with `mir::Constant`? It carries around a span, that's really more like a constant operand that appears as a MIR operand... it's more suited for `syntax.rs` than `consts.rs`, but the bigger question is, which name should it get if we want to align the `mir` and `ty` types? `ConstOperand`? `ConstOp`? `Literal`? It's not a literal but it has a field called `literal` so it would at least be consistently wrong-ish...
    
    ``@oli-obk`` any ideas?
    GuillaumeGomez authored Sep 21, 2023
    Configuration menu
    Copy the full SHA
    1351de3 View commit details
    Browse the repository at this point in the history
  3. Update to Cranelift 0.100

    This skips Cranelift 0.99 as it depends on an object version that is broken on
    macOS.
    bjorn3 committed Sep 21, 2023
    Configuration menu
    Copy the full SHA
    02dec62 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8071ec7 View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2023

  1. subst -> instantiate

    lcnr committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    159293c View commit details
    Browse the repository at this point in the history
  2. Sync from rust 0288f2e

    bjorn3 committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    b03d0b8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    74e9f26 View commit details
    Browse the repository at this point in the history
  4. Fix rustc test suite

    bjorn3 committed Sep 26, 2023
    Configuration menu
    Copy the full SHA
    ca18301 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    cb55ce1 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2023

  1. Configuration menu
    Copy the full SHA
    17d7821 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    809cd20 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2023

  1. Auto merge of rust-lang#115933 - oli-obk:simd_shuffle_const, r=workin…

    …gjubilee
    
    Prototype using const generic for simd_shuffle IDX array
    
    cc rust-lang#85229
    
    r? `@workingjubilee` on the design
    
    TLDR: there is now a `fn simd_shuffle_generic<T, U, const IDX: &'static [u32]>(x: T, y: T) -> U;` intrinsic that allows replacing
    
    ```rust
    simd_shuffle(a, b, const { stuff })
    ```
    
    with
    
    ```rust
    simd_shuffle_generic::<_, _, {&stuff}>(a, b)
    ```
    
    which makes the compiler implementations much simpler, if we manage to at some point eliminate `simd_shuffle`.
    
    There are some issues with this today though (can't do math without bubbling it up in the generic arguments). With this change, we can start porting the simple cases and get better data on the others.
    bors committed Sep 30, 2023
    Configuration menu
    Copy the full SHA
    81d219a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ffa2d3a View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2023

  1. implement major change tracking for the bootstrap configuration

    Signed-off-by: onur-ozkan <work@onurozkan.dev>
    onur-ozkan committed Oct 1, 2023
    Configuration menu
    Copy the full SHA
    2860a89 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2023

  1. Auto merge of rust-lang#115898 - onur-ozkan:config-change-tracking, r…

    …=Mark-Simulacrum
    
    bootstrap major change detection implementation
    
    The use of `changelog-seen` and `bootstrap/CHANGELOG.md` has not been functional in any way for many years. We often do major/breaking changes but never update the changelog file or the `changelog-seen`. This is an alternative method for tracking major or breaking changes and informing developers when such changes occur.
    
    Example output when bootstrap detects a major change:
    ![image](https://github.com/rust-lang/rust/assets/39852038/ee802dfa-a02b-488b-a433-f853ce079b8a)
    bors committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    f04620a View commit details
    Browse the repository at this point in the history
  2. Sync from rust e0d7ed1

    bjorn3 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    aeeed8a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5aeae05 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    654bc61 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b49adfe View commit details
    Browse the repository at this point in the history
  6. Update rand test

    bjorn3 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    cf36f4e View commit details
    Browse the repository at this point in the history
  7. Update regex and implement necessary AArch64 vendor intrinsics

    Upstream has removed the shootout-regex-dna example.
    bjorn3 committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    c974bc8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9536ec3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f1ede97 View commit details
    Browse the repository at this point in the history
  10. subtyping_projections

    ouz-a committed Oct 2, 2023
    Configuration menu
    Copy the full SHA
    4e9e0aa View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8c3406f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    646d8d9 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    27f88ee View commit details
    Browse the repository at this point in the history

Commits on Oct 3, 2023

  1. Auto merge of rust-lang#115025 - ouz-a:ouz_testing, r=lcnr

    Make subtyping explicit in MIR
    
    This adds new mir-opt that pushes new `ProjectionElem` called `ProjectionElem::Subtype(T)` to `Rvalue` of a subtyped assignment so we can unsoundness issues like rust-lang#107205
    
    Addresses rust-lang#112651
    
    r? `@lcnr`
    bors committed Oct 3, 2023
    Configuration menu
    Copy the full SHA
    673f447 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2023

  1. Fix misuses of a vs an

    Signed-off-by: cui fliter <imcusg@gmail.com>
    cuishuang committed Oct 4, 2023
    Configuration menu
    Copy the full SHA
    f61b14d View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2023

  1. Rollup merge of rust-lang#116223 - catandcoder:master, r=cjgillot

    Fix misuses of a vs an
    
    Fixes the misuse of "a" vs "an", according to English grammatical
    expectations and using https://www.a-or-an.com/
    workingjubilee authored Oct 5, 2023
    Configuration menu
    Copy the full SHA
    ed90087 View commit details
    Browse the repository at this point in the history
  2. Remove stub support for 32bit inline assembly

    Cranelift doesn't support any 32bit target yet and this helps with
    keeping everything in sync.
    bjorn3 committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    a47b9fd View commit details
    Browse the repository at this point in the history
  3. Support inline asm on AArch64

    Also stop changing the frame pointer on x86_64. This confuses unwinders.
    bjorn3 committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    b1421de View commit details
    Browse the repository at this point in the history
  4. Temporarily remove riscv64 inline asm support

    Riscv support is not currently being tested so it is likely broken.
    Removing it may avoid confusion in the future.
    bjorn3 committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    4577c1d View commit details
    Browse the repository at this point in the history
  5. Merge pull request rust-lang#1396 from bjorn3/aarch64_asm

    Support inline asm on AArch64
    bjorn3 authored Oct 5, 2023
    Configuration menu
    Copy the full SHA
    e825497 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2023

  1. compiler: always use var_os("RUST_BACKTRACE")

    There are 3 instances of var(...) and 3 instances of var_os(...); the
    latter avoids an appearance of unhandled error, so use it everywhere.
    tamird committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    2753052 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#116277 - RalfJung:post-mono, r=oli-obk

    dont call mir.post_mono_checks in codegen
    
    It seems like all tests are still passing when I remove this... let's see what CI says.
    workingjubilee authored Oct 6, 2023
    Configuration menu
    Copy the full SHA
    c9f6ac4 View commit details
    Browse the repository at this point in the history

Commits on Oct 7, 2023

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

Commits on Oct 8, 2023

  1. Auto merge of rust-lang#116487 - tamird:avoid-unwrap-absolute, r=bjorn3

    compiler: env/path handling fixes
    
    Please see individual commits. r? `@bjorn3` cf. rust-lang#116426
    bors committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    fea943d View commit details
    Browse the repository at this point in the history
  2. Sync from rust 97c81e1

    bjorn3 committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    1906ec5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8109344 View commit details
    Browse the repository at this point in the history
  4. Fix inline asm on macOS

    bjorn3 committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    07147f3 View commit details
    Browse the repository at this point in the history
  5. Skip cpuid shim when inline asm support is enabled

    cg_clif should support enough simd intrinsics now to not need almost all
    cpu features to be force disabled. In addition they can't be disabled
    anyway when using a sysroot compiled by LLVM.
    bjorn3 committed Oct 8, 2023
    Configuration menu
    Copy the full SHA
    91e5bd8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2672876 View commit details
    Browse the repository at this point in the history
  7. Merge pull request rust-lang#1397 from bjorn3/inline_asm_tweaks

    Test inline asm support on CI
    bjorn3 authored Oct 8, 2023
    Configuration menu
    Copy the full SHA
    cc5db2c View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2023

  1. Sync from rust bf9a1c8

    bjorn3 committed Oct 9, 2023
    Configuration menu
    Copy the full SHA
    88198c7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    81dc066 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    169055f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3ed3765 View commit details
    Browse the repository at this point in the history