about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift
AgeCommit message (Collapse)AuthorLines
2022-08-19Rollup merge of #100208 - RalfJung:dyn-upcast-nop, r=petrochenkovDylan DPC-0/+1
make NOP dyn casts not require anything about the vtable As suggested [on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-t-types/topic/dyn-upcasting.20stabilization/near/292151439). This matches what the codegen backends already do, and what Miri did do until https://github.com/rust-lang/rust/pull/99420 when I made it super extra paranoid.
2022-08-08also update anyhow in codegen_craneliftRalf Jung-2/+2
2022-08-06make NOP dyn casts not require anything about the vtableRalf Jung-0/+1
2022-07-28Introduce an ArchiveBuilderBuilderbjorn3-28/+34
This avoids monomorphizing all linker code for each codegen backend and will allow passing in extra information to the archive builder from the codegen backend.
2022-07-28Inline inject_dll_import_libbjorn3-4/+0
2022-07-28Move output argument from ArchiveBuilder::new to .build()bjorn3-7/+5
2022-07-26Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into ↵bjorn3-461/+705
sync_cg_clif-2022-07-26
2022-07-26Auto merge of #99745 - JohnTitor:rollup-lvrie64, r=JohnTitorbors-220/+474
Rollup of 7 pull requests Successful merges: - #98211 (Implement `fs::get_path` for FreeBSD.) - #99353 (Slightly improve mismatched GAT where clause error) - #99593 (Suggest removing the tuple struct field for the unwrapped value) - #99615 (Remove some explicit `self.infcx` for `FnCtxt`, which already derefs into `InferCtxt`) - #99711 (Remove reachable coverage without counters) - #99718 (Avoid `&str`/`Symbol` to `String` conversions) - #99720 (Sync rustc_codegen_cranelift) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-26Auto merge of #98989 - dpaoliello:rawdylibbin, r=michaelwoeristerbors-5/+9
Enable raw-dylib for bin crates Fixes #93842 When `raw-dylib` is used in a `bin` crate, we need to collect all of the `raw-dylib` functions, generate the import library and add that to the linker command line. I also changed the tests so that 1) the C++ dlls are created after the Rust dlls, thus there is no chance of accidentally using them in the Rust linking process and 2) disabled generating import libraries when building with MSVC.
2022-07-25Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into ↵bjorn3-220/+474
sync_cg_clif-2022-07-25
2022-07-24Auto merge of #99251 - cuviper:hashbrown-0.12, r=Mark-Simulacrumbors-5/+5
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 (#99372).
2022-07-22Enable raw-dylib for binariesDaniel Paoliello-5/+9
2022-07-20various nits from reviewRalf Jung-1/+0
2022-07-20Implement vtable_size and vtable_align intrinsics for cg_clifbjorn3-0/+10
2022-07-20slightly cleaner, if more verbose, vtable handling in codegen backendsRalf Jung-6/+14
2022-07-20consistently use VTable over Vtable (matching stable stdlib API RawWakerVTable)Ralf Jung-4/+4
2022-07-20rename get_global_alloc to try_get_global_allocRalf Jung-1/+1
2022-07-20add a Vtable kind of symbolic allocationsRalf Jung-8/+18
2022-07-20Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank"Oli Scherer-9/+0
This reverts commit 6f8fb911ad504b77549cf3256a09465621beab9d, reversing changes made to 7210e46dc69a4b197a313d093fe145722c248b7d.
2022-07-17Auto merge of #99033 - 5225225:interpreter-validity-checks, r=oli-obkbors-13/+2
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 :)
2022-07-17Upgrade hashbrown to 0.12.3Amanieu d'Antras-2/+2
This fixes a double-free in the `clone_from` function if dropping an existing element in the table panics. See https://github.com/rust-lang/hashbrown/pull/348 for more details.
2022-07-17Upgrade indexmap and thorin-dwp to use hashbrown 0.12Josh Stone-5/+5
This removes the last dependencies on hashbrown 0.11.
2022-07-15Introduce opaque type to hidden type projectionOli Scherer-0/+9
2022-07-14Use constant eval to do strict validity checks5225225-13/+2
2022-07-13Rename `debugging_opts` to `unstable_opts`Joshua Nelson-6/+6
This is no longer used only for debugging options (e.g. `-Zoutput-width`, `-Zallow-features`). Rename it to be more clear.
2022-07-13Auto merge of #99210 - Dylan-DPC:rollup-879cp1t, r=Dylan-DPCbors-1/+1
Rollup of 5 pull requests Successful merges: - #98574 (Lower let-else in MIR) - #99011 (`UnsafeCell` blocks niches inside its nested type from being available outside) - #99030 (diagnostics: error messages when struct literals fail to parse) - #99155 (Keep unstable target features for asm feature checking) - #99199 (Refactor: remove an unnecessary `span_to_snippet`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-07-13Rollup merge of #99155 - Amanieu:unstable-target-features, r=davidtwcoDylan DPC-1/+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 #99071
2022-07-12add new rval, pull deref earlyouz-a-0/+5
2022-07-11Keep unstable target features for asm feature checkingAmanieu d'Antras-1/+1
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 #99071
2022-07-09Partially stabilize const_slice_from_raw_partsKonrad Borowski-1/+0
This doesn't stabilize methods working on mutable pointers.
2022-07-09tweak names and output and blessRalf Jung-1/+1
2022-07-09review feedbackRalf Jung-1/+1
2022-07-09fix cranelift and gcc backendsRalf Jung-0/+1
2022-07-09Rollup merge of #99070 - tamird:update-tracking-issue, r=RalfJungDylan DPC-16/+16
Update integer_atomics tracking issue Updates #32976. Updates #99069. r? ``@RalfJung``
2022-07-08Update integer_atomics tracking issueTamir Duberstein-16/+16
Updates #32976. Updates #99069.
2022-07-06incr: cache dwarf objects in work productsDavid Wood-2/+9
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>
2022-07-06Update TypeVisitor pathsAlan Egerton-1/+1
2022-07-05Auto merge of #96862 - oli-obk:enum_cast_mir, r=RalfJungbors-23/+0
Change enum->int casts to not go through MIR casts. follow-up to https://github.com/rust-lang/rust/pull/96814 this simplifies all backends and even gives LLVM more information about the return value of `Rvalue::Discriminant`, enabling optimizations in more cases.
2022-06-30Recover when failing to normalize closure signature.Camille GILLOT-0/+1
2022-06-30Change enum->int casts to not go through MIR casts.Oli Scherer-23/+0
Instead we generate a discriminant rvalue and cast the result of that.
2022-06-27Update `smallvec` to 1.8.1.Nicholas Nethercote-3/+3
This pulls in https://github.com/servo/rust-smallvec/pull/282, which gives some small wins for rustc.
2022-06-21Auto merge of #98098 - bjorn3:archive_refactor, r=michaelwoeristerbors-35/+8
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 https://github.com/rust-lang/rust/pull/97485.
2022-06-19Remove the source archive functionality of ArchiveWriterbjorn3-21/+3
We now build archives through strictly additive means rather than taking an existing archive and potentially substracting parts.
2022-06-19Fix "Remove src_files and remove_file"bjorn3-1/+5
2022-06-19Rollup merge of #98165 - WaffleLapkin:once_things_renamings, r=m-ou-seMatthias Krüger-1/+1
once cell renamings This PR does the renamings proposed in https://github.com/rust-lang/rust/issues/74465#issuecomment-1153703128 - 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
2022-06-17Rollup merge of #97675 - nvzqz:unsized-needs-drop, r=dtolnayYuki Okushi-1/+8
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 https://github.com/rust-lang/rust/pull/97676.
2022-06-16Move/rename `lazy::Sync{OnceCell,Lazy}` to `sync::{Once,Lazy}Lock`Maybe Waffle-1/+1
2022-06-14Remove src_files and remove_filebjorn3-13/+0
They only apply to the main source archive and their role can be fulfilled through the skip argument of add_archive too.
2022-06-14implement valtrees as the type-system representation for constant valuesb-naber-4/+5
2022-06-14Rename the `ConstS::val` field as `kind`.Nicholas Nethercote-4/+4
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.