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

Merged
merged 101 commits into from
Dec 15, 2022
Merged

Commits on Oct 8, 2022

  1. Auto merge of rust-lang#2583 - RalfJung:rustup, r=oli-obk

    initial josh subtree sync
    
    This demonstrates what a josh-based rustup would look like with my patched josh. To create it I did
    ```
    git fetch http://localhost:8000/rust-lang/rust.git:start=75dd959a3a40eb5b4574f8d2e23aa6efbeb33573[:prefix=src/tools/miri]:/src/tools/miri.git master
    git merge FETCH_HEAD
    ./rustup-toolchain HEAD && ./miri fmt
    git commit -am rustup
    ```
    Unlike the [previous attempt](rust-lang/miri#2554), this does not add a new root commit to the repo.
    
    Once we merge this, we committed to using josh for subtree syncing, and in particular a version of josh that includes josh-project/josh#961 (or something compatible).
    bors committed Oct 8, 2022
    Configuration menu
    Copy the full SHA
    31792f1 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2022

  1. merge rustc history

    RalfJung committed Oct 9, 2022
    Configuration menu
    Copy the full SHA
    55fe2b3 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2022

  1. merge rustc history

    RalfJung committed Oct 21, 2022
    Configuration menu
    Copy the full SHA
    1e720cd View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2022

  1. Configuration menu
    Copy the full SHA
    9950bd1 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'sync_from_rust'

    bjorn3 committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    4029785 View commit details
    Browse the repository at this point in the history
  3. Rustfmt cg_clif's build system

    bjorn3 committed Oct 23, 2022
    Configuration menu
    Copy the full SHA
    63d1bf9 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2022

  1. Sync from rust 1481fd9

    bjorn3 committed Oct 24, 2022
    Configuration menu
    Copy the full SHA
    b345c1e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e3311e4 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2022

  1. Auto merge of rust-lang#103392 - RalfJung:miri, r=oli-obk

    update Miri
    
    I had to use a hacked version of josh to create this, so let's be careful with merging this and maybe wait a bit to see if the josh issue becomes more clear. But the history looks good to me, we are not adding duplicates of rustc commits that were previously mirrored to Miri.
    
    Also I want to add some cross-testing of Miri in x.py.
    bors committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    5e18725 View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2022

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

Commits on Oct 27, 2022

  1. Update tooling

    WaffleLapkin committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    33a92bc View commit details
    Browse the repository at this point in the history
  2. Update to Cranelift 0.89.1

    This removes the rayon dependency that requires the previous update to
    Cranelift 0.89.0 to be reverted.
    bjorn3 committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    d3fe9a8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5513583 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2022

  1. Use 2021 edition for y.rs

    bjorn3 committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    a24213d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd8be32 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ddc66ff View commit details
    Browse the repository at this point in the history
  4. Add rustdoc-clif wrapper

    bjorn3 committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    f17dbfc View commit details
    Browse the repository at this point in the history
  5. Ignore rustfmt for y.rs

    bjorn3 committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    e0ba71e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c57aacf View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2022

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

Commits on Oct 31, 2022

  1. Rewrite implementation of #[alloc_error_handler]

    The new implementation doesn't use weak lang items and instead changes
    `#[alloc_error_handler]` to an attribute macro just like
    `#[global_allocator]`.
    
    The attribute will generate the `__rg_oom` function which is called by
    the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom`
    function is defined in any crate then the compiler shim will call
    `__rdl_oom` in the alloc crate which will simply panic.
    
    This also fixes link errors with `-C link-dead-code` with
    `default_alloc_error_handler`: `__rg_oom` was previously defined in the
    alloc crate and would attempt to reference the `oom` lang item, even if
    it didn't exist. This worked as long as `__rg_oom` was excluded from
    linking since it was not called.
    
    This is a prerequisite for the stabilization of
    `default_alloc_error_handler` (rust-lang#102318).
    Amanieu committed Oct 31, 2022
    Configuration menu
    Copy the full SHA
    b166ad0 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Sync from rust 432b1a4

    bjorn3 committed Nov 3, 2022
    Configuration menu
    Copy the full SHA
    736fac8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    051b6dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    449f95b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7941cba View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2022

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

Commits on Nov 6, 2022

  1. fix cranelift and gcc

    RalfJung committed Nov 6, 2022
    Configuration menu
    Copy the full SHA
    b5523e3 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2022

  1. Fix rustdoc --version when used with download-rustc

    Previously, rustdoc would unconditionally report the version that *rustc* was compiled with.
    That showed things like `nightly-2022-10-30`, which wasn't right, since this was a `dev` build compiled from source.
    
    Fix it by changing `rustc_driver::version` to a macro expanded at invocation time.
    jyn514 committed Nov 9, 2022
    Configuration menu
    Copy the full SHA
    ade426f View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2022

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

Commits on Nov 13, 2022

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

Commits on Nov 15, 2022

  1. Auto merge of rust-lang#104054 - RalfJung:byte-provenance, r=oli-obk

    interpret: support for per-byte provenance
    
    Also factors the provenance map into its own module.
    
    The third commit does the same for the init mask. I can move it in a separate PR if you prefer.
    
    Fixes rust-lang/miri#2181
    
    r? `@oli-obk`
    bors committed Nov 15, 2022
    Configuration menu
    Copy the full SHA
    03e3cc5 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2022

  1. Configuration menu
    Copy the full SHA
    2d0c41a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    268219d View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2022

  1. Use custom entry name in cranelift

    This is a continuation of 9f0a862 for
    cranelift.
    
    Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
    Ayush1325 committed Nov 17, 2022
    Configuration menu
    Copy the full SHA
    6ee9712 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2022

  1. Rollup merge of rust-lang#104001 - Ayush1325:custom-entry, r=bjorn3

    Improve generating Custom entry function
    
    This commit is aimed at making compiler-generated entry functions (Basically just C `main` right now) more generic so other targets can do similar things for custom entry. This was initially implemented as part of rust-lang#100316.
    
    Currently, this moves the entry function name and Call convention to the target spec.
    
    Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
    Dylan-DPC committed Nov 19, 2022
    Configuration menu
    Copy the full SHA
    5fd3e4d View commit details
    Browse the repository at this point in the history
  2. deduplicate constant evaluation in cranelift backend

    also sync LLVM and cranelift structure a bit
    RalfJung committed Nov 19, 2022
    Configuration menu
    Copy the full SHA
    a3c89a7 View commit details
    Browse the repository at this point in the history
  3. Sync from rust 5e6de23

    bjorn3 committed Nov 19, 2022
    Configuration menu
    Copy the full SHA
    d6b54a5 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2022

  1. Configuration menu
    Copy the full SHA
    be1006b View commit details
    Browse the repository at this point in the history
  2. Fix running rustc tests

    bjorn3 committed Nov 20, 2022
    Configuration menu
    Copy the full SHA
    9723c79 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2022

  1. Rollup merge of rust-lang#104605 - RalfJung:clf_consts, r=bjorn3

    deduplicate constant evaluation in cranelift backend
    
    The cranelift backend had two matches on `ConstantKind`, which can be avoided, and used this `eval_for_mir` that nothing else uses... this makes things more consistent with the (better-tested) LLVM backend.
    
    I noticed this because cranelift was the only user of `eval_for_mir`. However `try_eval_for_mir` still has one other user in `eval`... the odd thing is that the interpreter has its own `eval_mir_constant` which seems to duplicate the same functionality and does not use `try_eval_for_mir`. No idea what is happening here.
    
    r? ``@bjorn3``
    Cc ``@lcnr``
    matthiaskrgr committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    d3817e2 View commit details
    Browse the repository at this point in the history
  2. Fix discriminant handling

    bjorn3 committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    cf92372 View commit details
    Browse the repository at this point in the history
  3. Rustfmt

    bjorn3 committed Nov 21, 2022
    Configuration menu
    Copy the full SHA
    a449d0d View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2022

  1. Sync from rust 66ccf36

    bjorn3 committed Nov 22, 2022
    Configuration menu
    Copy the full SHA
    d23eb65 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d30c1dd View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    24ebf42 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2022

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

Commits on Nov 24, 2022

  1. Auto merge of rust-lang#104507 - WaffleLapkin:asderefsyou, r=wesleywiser

    Use `as_deref` in compiler (but only where it makes sense)
    
    This simplifies some code :3
    
    (there are some changes that are not exacly `as_deref`, but more like "clever `Option`/`Result` method use")
    bors committed Nov 24, 2022
    Configuration menu
    Copy the full SHA
    982798f View commit details
    Browse the repository at this point in the history

Commits on Nov 26, 2022

  1. Rollup merge of rust-lang#104786 - WaffleLapkin:amp-mut-help, r=compi…

    …ler-errors
    
    Use the power of adding helper function to simplify code w/ `Mutability`
    
    r? `@compiler-errors`
    GuillaumeGomez committed Nov 26, 2022
    Configuration menu
    Copy the full SHA
    69a7692 View commit details
    Browse the repository at this point in the history
  2. Rewrite LLVM's archive writer in Rust

    This allows it to be used by other codegen backends
    bjorn3 committed Nov 26, 2022
    Configuration menu
    Copy the full SHA
    5399526 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2022

  1. Configuration menu
    Copy the full SHA
    a085a2a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef6400d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1367983 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    75838d9 View commit details
    Browse the repository at this point in the history
  5. Rustfmt

    bjorn3 committed Nov 27, 2022
    Configuration menu
    Copy the full SHA
    f851dfa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cdae9ba View commit details
    Browse the repository at this point in the history
  7. Merge pull request rust-lang#1297 from bjorn3/aarch64_simd

    Implement some AArch64 SIMD intrinsics
    bjorn3 committed Nov 27, 2022
    Configuration menu
    Copy the full SHA
    f99140e View commit details
    Browse the repository at this point in the history
  8. Merge pull request rust-lang#1298 from bjorn3/build_system_rework3

    Introduce CargoProject type and use it where possible
    bjorn3 committed Nov 27, 2022
    Configuration menu
    Copy the full SHA
    a00c7a0 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2022

  1. Rename the build/ directory to dist/

    This will allow putting all temporary build artifacts in build/ in the
    future, keeping all the build output artifacts in dist/
    bjorn3 committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    26d48c9 View commit details
    Browse the repository at this point in the history
  2. Implement __isb for AArch64

    This is necessary for the mutex implementation of libstd when there is
    contention. Seems like I hadn't hit this before by sheer luck.
    bjorn3 committed Nov 28, 2022
    Configuration menu
    Copy the full SHA
    052d5cc View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9c21990 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2022

  1. Merge pull request rust-lang#1300 from bjorn3/rename_build_to_dist

    Rename the build/ directory to dist/
    bjorn3 committed Nov 29, 2022
    Configuration menu
    Copy the full SHA
    70ba23b View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2022

  1. Ignore out-of-stack test

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    3cf8994 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6768d0d View commit details
    Browse the repository at this point in the history
  3. Remove all usages of iconst.i128

    Support was removed from Cranelift
    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    16a2641 View commit details
    Browse the repository at this point in the history
  4. Fix warning

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    777106a View commit details
    Browse the repository at this point in the history
  5. Use git version of Cranelift

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    e9115eb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ae98a2f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    83dc7d1 View commit details
    Browse the repository at this point in the history
  8. bswap.i128 is now supported

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    3df425e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    155f569 View commit details
    Browse the repository at this point in the history
  10. Update Cranelift to 0.90.0

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    202bdc1 View commit details
    Browse the repository at this point in the history
  11. Update Cranelift to 0.90.1

    This fixes building on FreeBSD
    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    a54a377 View commit details
    Browse the repository at this point in the history
  12. Merge pull request rust-lang#1295 from bjorn3/update_cranelift

    Update Cranelift to 0.90.0
    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    450257c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    5e97a39 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    e75dfef View commit details
    Browse the repository at this point in the history
  15. Introduce RelPath

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    4529979 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    82b2d8e View commit details
    Browse the repository at this point in the history
  17. Fix installing hyperfine

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    d7b02c3 View commit details
    Browse the repository at this point in the history
  18. Fix build dir caching

    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    702a293 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    b6ac5a3 View commit details
    Browse the repository at this point in the history
  20. Merge pull request rust-lang#1302 from bjorn3/build_system_rework4

    Allow specifying where build artifacts should be written to
    bjorn3 committed Dec 1, 2022
    Configuration menu
    Copy the full SHA
    f73b0b1 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2022

  1. Fix crash with TAIT in the call codegen code

    The new logic is closer to what cg_llvm does.
    
    Fixes rust-lang#1240
    bjorn3 committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    04eaaa0 View commit details
    Browse the repository at this point in the history
  2. Switch Linux runner to ubuntu-20.04 to unbreak CI

    Earlier today CI started to fail on Linux with a crash during the
    jit mode. Turns out ubuntu-latest switched from ubuntu-20.04 to
    ubuntu-22.04. Let's switch back to ubuntu-20.04 for now to unbreak
    CI until I figured out the root cause.
    
    cc rust-lang#1303
    bjorn3 committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    f845eaf View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2022

  1. Auto merge of rust-lang#97485 - bjorn3:new_archive_writer, r=wesleywiser

    Rewrite LLVM's archive writer in Rust
    
    This allows it to be used by other codegen backends.
    
    Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1155
    bors committed Dec 3, 2022
    Configuration menu
    Copy the full SHA
    f1dc349 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e12a882 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2022

  1. Sync from rust fd02567

    bjorn3 committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    b8a3c2d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    63fab51 View commit details
    Browse the repository at this point in the history

Commits on Dec 9, 2022

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

Commits on Dec 11, 2022

  1. Sync from rust b3ddfeb

    bjorn3 committed Dec 11, 2022
    Configuration menu
    Copy the full SHA
    8f9a048 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef1cb95 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    21f4355 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a89cef5 View commit details
    Browse the repository at this point in the history
  5. Update dependencies

    bjorn3 committed Dec 11, 2022
    Configuration menu
    Copy the full SHA
    7e10f1a View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f7c76ad View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2022

  1. Sync from rust ed620cf

    bjorn3 committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    e3d70e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e772b8 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2022

  1. Configuration menu
    Copy the full SHA
    08ba5d4 View commit details
    Browse the repository at this point in the history
  2. Explicitly provide dummy git author name and email

    This avoids the need to tell git beforehand about your name and email
    bjorn3 committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    a45924c View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary git init

    bjorn3 committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    2bb3996 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9496999 View commit details
    Browse the repository at this point in the history
  5. Add tidy exceptions

    bjorn3 committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    13e33c0 View commit details
    Browse the repository at this point in the history