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

Merged
merged 96 commits into from
Jul 26, 2022
Merged

Commits on May 15, 2022

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

    bjorn3 committed May 15, 2022
    Configuration menu
    Copy the full SHA
    715533e View commit details
    Browse the repository at this point in the history

Commits on May 17, 2022

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

Commits on May 18, 2022

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

Commits on May 20, 2022

  1. Update Cranelift and object

    bjorn3 committed May 20, 2022
    Configuration menu
    Copy the full SHA
    6c9a06e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    814ed4f View commit details
    Browse the repository at this point in the history

Commits on May 22, 2022

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

Commits on May 23, 2022

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

Commits on May 24, 2022

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

Commits on May 30, 2022

  1. Add support for emitting functions with coldcc in LLVM

    The eventual goal is to try using this for things like the internal panicking stuff, to see whether it helps.
    scottmcm committed May 30, 2022
    Configuration menu
    Copy the full SHA
    e2f90f7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4ee48c0 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2022

  1. Add a pointer to address cast kind

    A pointer to address cast are often special-cased.
    Introduce a dedicated cast kind to make them easy distinguishable.
    tmiasko committed May 31, 2022
    Configuration menu
    Copy the full SHA
    e600875 View commit details
    Browse the repository at this point in the history

Commits on Jun 1, 2022

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

Commits on Jun 2, 2022

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

Commits on Jun 3, 2022

  1. Configuration menu
    Copy the full SHA
    7a8b96f View commit details
    Browse the repository at this point in the history
  2. Fix unsized field order

    nvzqz committed Jun 3, 2022
    Configuration menu
    Copy the full SHA
    eb5f237 View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Rename CodegenUnit::work_product to previous_work_product

    It returns the previous work product or panics if there is none. This rename
    makes the purpose of this method clearer.
    bjorn3 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    d5cb2be View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a1a111 View commit details
    Browse the repository at this point in the history
  3. Factor Option out of copy_cgu_workproduct_to_incr_comp_cache_dir call

    This improves clarity of the code a bit
    bjorn3 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    bbb8509 View commit details
    Browse the repository at this point in the history
  4. Make saved_file field of WorkProduct non-optional

    A WorkProduct without a saved file is useless
    bjorn3 committed Jun 6, 2022
    Configuration menu
    Copy the full SHA
    3d8e854 View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2022

  1. Auto merge of rust-lang#97512 - scottmcm:add-coldcc, r=nagisa,lcnr

    Add support for emitting functions with `coldcc` to LLVM
    
    The eventual goal is to try using this for things like the internal panicking stuff, to see whether it helps.
    bors committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    d8bd0a9 View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#97825 - Dylan-DPC:rollup-ya51k1k, r=Dylan-DPC

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#97058 (Various refactors to the incr comp workproduct handling)
     - rust-lang#97301 (Allow unstable items to be re-exported unstably without requiring the feature be enabled)
     - rust-lang#97738 (Fix ICEs from zsts within unsized types with non-zero offsets)
     - rust-lang#97771 (Remove SIGIO reference on Haiku)
     - rust-lang#97808 (Add some unstable target features for the wasm target codegen)
    
    Failed merges:
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Jun 7, 2022
    Configuration menu
    Copy the full SHA
    b867d41 View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Sync from rust be16c61

    bjorn3 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    74f3916 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    875ffa1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a298c69 View commit details
    Browse the repository at this point in the history
  4. Fix running rustc tests

    There are still two failures due to incorrect test annotations
    bjorn3 committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    ec841f5 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. Rename the ConstS::val field as kind.

    And likewise for the `Const::val` method.
    
    Because its type is called `ConstKind`. Also `val` is a confusing name
    because `ConstKind` is an enum with seven variants, one of which is
    called `Value`. Also, this gives consistency with `TyS` and `PredicateS`
    which have `kind` fields.
    
    The commit also renames a few `Const` variables from `val` to `c`, to
    avoid confusion with the `ConstKind::Value` variant.
    nnethercote committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    ce2b3a9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c431540 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9096b3e View commit details
    Browse the repository at this point in the history
  4. Remove src_files and remove_file

    They only apply to the main source archive and their role can be
    fulfilled through the skip argument of add_archive too.
    bjorn3 committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    fc0c753 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Configuration menu
    Copy the full SHA
    6d8c450 View commit details
    Browse the repository at this point in the history
  2. Rollup merge of rust-lang#97675 - nvzqz:unsized-needs-drop, r=dtolnay

    Make `std::mem::needs_drop` accept `?Sized`
    
    This change attempts to make `needs_drop` work with types like `[u8]` and `str`.
    
    This enables code in types like `Arc<T>` that was not possible before, such as rust-lang#97676.
    JohnTitor committed Jun 16, 2022
    Configuration menu
    Copy the full SHA
    449b309 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2022

  1. Rollup merge of rust-lang#98165 - WaffleLapkin:once_things_renamings,…

    … r=m-ou-se
    
    once cell renamings
    
    This PR does the renamings proposed in rust-lang#74465 (comment)
    
    - Move/rename `lazy::{OnceCell, Lazy}` to `cell::{OnceCell, LazyCell}`
    - Move/rename `lazy::{SyncOnceCell, SyncLazy}` to `sync::{OnceLock, LazyLock}`
    
    (I used `Lazy...` instead of `...Lazy` as it seems to be more consistent, easier to pronounce, etc)
    
    ```@rustbot``` label +T-libs-api -T-libs
    matthiaskrgr committed Jun 18, 2022
    Configuration menu
    Copy the full SHA
    5543d22 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2022

  1. Configuration menu
    Copy the full SHA
    abb9b60 View commit details
    Browse the repository at this point in the history
  2. Remove the source archive functionality of ArchiveWriter

    We now build archives through strictly additive means rather than taking
    an existing archive and potentially substracting parts.
    bjorn3 committed Jun 19, 2022
    Configuration menu
    Copy the full SHA
    73b3ae0 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. Auto merge of rust-lang#98098 - bjorn3:archive_refactor, r=michaelwoe…

    …rister
    
    Remove the source archive functionality of ArchiveWriter
    
    We now build archives through strictly additive means rather than taking an existing archive and potentially substracting parts. This is simpler and makes it easier to swap out the archive writer in rust-lang#97485.
    bors committed Jun 21, 2022
    Configuration menu
    Copy the full SHA
    92749f0 View commit details
    Browse the repository at this point in the history

Commits on Jun 23, 2022

  1. Sync from rust 10f4ce3

    bjorn3 committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    473e80e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c58a11e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6d5e8f3 View commit details
    Browse the repository at this point in the history
  4. Update Cranelift to 0.85.0

    bjorn3 committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    7c5fbac View commit details
    Browse the repository at this point in the history
  5. Disable DWARF debuginfo on Windows

    Windows uses PDB instead of DWARF and using DWARF debuginfo causes the linker to give an error
    bjorn3 committed Jun 23, 2022
    Configuration menu
    Copy the full SHA
    439c323 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8a4557e View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2022

  1. Update smallvec to 1.8.1.

    This pulls in servo/rust-smallvec#282, which
    gives some small wins for rustc.
    nnethercote committed Jun 26, 2022
    Configuration menu
    Copy the full SHA
    f516ba2 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2022

  1. Update to Cranelift 0.85.1

    This fixes a miscompilation
    bjorn3 committed Jun 28, 2022
    Configuration menu
    Copy the full SHA
    f060ae9 View commit details
    Browse the repository at this point in the history
  2. Run regalloc checker on CI

    This would have caught the issue that required releasing Cranelift 0.85.1
    bjorn3 committed Jun 28, 2022
    Configuration menu
    Copy the full SHA
    56c5c09 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c1ac2df View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    45b6cd6 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2022

  1. Change enum->int casts to not go through MIR casts.

    Instead we generate a discriminant rvalue and cast the result of that.
    oli-obk committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    846eecb View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a71e691 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2022

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

Commits on Jul 3, 2022

  1. Sync from rust f99f9e4

    bjorn3 committed Jul 3, 2022
    Configuration menu
    Copy the full SHA
    b344691 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8720683 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b8aab37 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2022

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

    Change enum->int casts to not go through MIR casts.
    
    follow-up to rust-lang#96814
    
    this simplifies all backends and even gives LLVM more information about the return value of `Rvalue::Discriminant`, enabling optimizations in more cases.
    bors committed Jul 5, 2022
    Configuration menu
    Copy the full SHA
    96bdb39 View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2022

  1. Update TypeVisitor paths

    eggyal committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    44c2558 View commit details
    Browse the repository at this point in the history
  2. incr: cache dwarf objects in work products

    Cache DWARF objects alongside object files in work products when those
    exist so that DWARF object files are available for thorin in packed mode
    in incremental scenarios.
    
    Signed-off-by: David Wood <david.wood@huawei.com>
    davidtwco committed Jul 6, 2022
    Configuration menu
    Copy the full SHA
    69d0c1e View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2022

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

Commits on Jul 9, 2022

  1. Rollup merge of rust-lang#99070 - tamird:update-tracking-issue, r=Ral…

    …fJung
    
    Update integer_atomics tracking issue
    
    Updates rust-lang#32976.
    Updates rust-lang#99069.
    
    r? ``@RalfJung``
    Dylan-DPC committed Jul 9, 2022
    Configuration menu
    Copy the full SHA
    e151a09 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9442b6 View commit details
    Browse the repository at this point in the history
  3. review feedback

    RalfJung committed Jul 9, 2022
    Configuration menu
    Copy the full SHA
    f44d5fe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c78b438 View commit details
    Browse the repository at this point in the history
  5. Partially stabilize const_slice_from_raw_parts

    This doesn't stabilize methods working on mutable pointers.
    KamilaBorowska committed Jul 9, 2022
    Configuration menu
    Copy the full SHA
    743cee6 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2022

  1. Keep unstable target features for asm feature checking

    Inline assembly uses the target features to determine which registers
    are available on the current target. However it needs to be able to
    access unstable target features for this.
    
    Fixes rust-lang#99071
    Amanieu committed Jul 11, 2022
    Configuration menu
    Copy the full SHA
    a7347a9 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2022

  1. add new rval, pull deref early

    ouz-a committed Jul 12, 2022
    Configuration menu
    Copy the full SHA
    9efccc9 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Rollup merge of rust-lang#99155 - Amanieu:unstable-target-features, r…

    …=davidtwco
    
    Keep unstable target features for asm feature checking
    
    Inline assembly uses the target features to determine which registers
    are available on the current target. However it needs to be able to
    access unstable target features for this.
    
    Fixes rust-lang#99071
    Dylan-DPC committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    38c321a View commit details
    Browse the repository at this point in the history
  2. Auto merge of rust-lang#99210 - Dylan-DPC:rollup-879cp1t, r=Dylan-DPC

    Rollup of 5 pull requests
    
    Successful merges:
    
     - rust-lang#98574 (Lower let-else in MIR)
     - rust-lang#99011 (`UnsafeCell` blocks niches inside its nested type from being available outside)
     - rust-lang#99030 (diagnostics: error messages when struct literals fail to parse)
     - rust-lang#99155 (Keep unstable target features for asm feature checking)
     - rust-lang#99199 (Refactor: remove an unnecessary `span_to_snippet`)
    
    Failed merges:
    
    r? `@ghost`
    `@rustbot` modify labels: rollup
    bors committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    4338881 View commit details
    Browse the repository at this point in the history
  3. Rename debugging_opts to unstable_opts

    This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`).
    Rename it to be more clear.
    jyn514 committed Jul 13, 2022
    Configuration menu
    Copy the full SHA
    b2ae24e View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2022

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

Commits on Jul 15, 2022

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

Commits on Jul 17, 2022

  1. Upgrade indexmap and thorin-dwp to use hashbrown 0.12

    This removes the last dependencies on hashbrown 0.11.
    cuviper committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    f750d8b View commit details
    Browse the repository at this point in the history
  2. Upgrade hashbrown to 0.12.3

    This fixes a double-free in the `clone_from` function if dropping an
    existing element in the table panics. See
    rust-lang/hashbrown#348 for more details.
    Amanieu authored and cuviper committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    ec46952 View commit details
    Browse the repository at this point in the history
  3. Auto merge of rust-lang#99033 - 5225225:interpreter-validity-checks, …

    …r=oli-obk
    
    Use constant eval to do strict mem::uninit/zeroed validity checks
    
    I'm not sure about the code organisation here, I just dumped the check in rustc_const_eval at the root. Not hard to move it elsewhere, in any case.
    
    Also, this means cranelift codegen intrinsics lose the strict checks, since they don't seem to depend on rustc_const_eval, and I didn't see a point in keeping around two copies.
    
    I also left comments in the is_zero_valid methods about "uhhh help how do i do this", those apply to both methods equally.
    
    Also rustc_codegen_ssa now depends on rustc_const_eval... is this okay?
    
    Pinging `@RalfJung` since you were the one who mentioned this to me, so I'm assuming you're interested.
    
    Haven't had a chance to run full tests on this since it's really warm, and it's 1AM, I'll check out any failures/comments in the morning :)
    bors committed Jul 17, 2022
    Configuration menu
    Copy the full SHA
    33b297a View commit details
    Browse the repository at this point in the history

Commits on Jul 18, 2022

  1. Sync from rust 8804161

    bjorn3 committed Jul 18, 2022
    Configuration menu
    Copy the full SHA
    cff5eed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bc061fa View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5fcedf6 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2022

  1. Revert "Rollup merge of rust-lang#98582 - oli-obk:unconstrained_opaqu…

    …e_type, r=estebank"
    
    This reverts commit 6f8fb91, reversing
    changes made to 7210e46.
    oli-obk committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    22a0a2e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c77e2b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b5cce74 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    a1b1722 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6c9abfa View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f8feed7 View commit details
    Browse the repository at this point in the history
  7. various nits from review

    RalfJung committed Jul 20, 2022
    Configuration menu
    Copy the full SHA
    d07ed02 View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2022

  1. Configuration menu
    Copy the full SHA
    cd96988 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a6b602d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3207c9f View commit details
    Browse the repository at this point in the history

Commits on Jul 24, 2022

  1. Auto merge of rust-lang#99251 - cuviper:hashbrown-0.12, r=Mark-Simula…

    …crum
    
    Upgrade indexmap and thorin-dwp to use hashbrown 0.12
    
    This removes the last dependencies on hashbrown 0.11.
    
    This also upgrades to hashbrown 0.12.3 to fix a double-free (rust-lang#99372).
    bors committed Jul 24, 2022
    Configuration menu
    Copy the full SHA
    745193d View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2022

  1. Error when trying to define variadic functions

    They aren't yet supported by Cranelift
    bjorn3 committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    39ee14d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7ef2ba8 View commit details
    Browse the repository at this point in the history
  3. Fix -Zpolymorphize

    bjorn3 committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    fd2669d View commit details
    Browse the repository at this point in the history
  4. Merge pull request rust-lang#1247 from bjorn3/melt_some_ice

    Melt some ICE
    bjorn3 committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    722733c View commit details
    Browse the repository at this point in the history
  5. Update Cranelift to 0.85.3

    This fixes a couple of potential miscompilations. None affect cg_clif on
    x86_64, but one may affect cg_clif on AArch64.
    bjorn3 committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    d7fc563 View commit details
    Browse the repository at this point in the history
  6. Sync from rust 2f320a2

    bjorn3 committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    4e1155f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    c19edfd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    7a3ed23 View commit details
    Browse the repository at this point in the history
  9. Update list of allowed dependencies

    Cranelift started depending on a couple of new crates
    bjorn3 committed Jul 25, 2022
    Configuration menu
    Copy the full SHA
    9dc4ed8 View commit details
    Browse the repository at this point in the history