about summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/common.rs
AgeCommit message (Collapse)AuthorLines
2023-12-19Merge commit '3a9bf729322fb5035518f99b9d76a742bf7c124e' into ↵bjorn3-5/+9
sync_cg_clif-2023-12-19
2023-10-28share the track_caller handling within a mir::BodyRalf Jung-32/+5
2023-10-28interpret: call caller_location logic the same way codegen does, and share ↵Ralf Jung-10/+1
some code
2023-10-24Merge commit '93a5433f17ab5ed48cc88f1e69b0713b16183373' into ↵bjorn3-0/+19
sync_cg_clif-2023-10-24
2023-10-17[RFC 3127 - Trim Paths]: Condition remapped filepath on remap scopesUrgau-1/+2
2023-10-09Merge commit '81dc066758ec150b43822d4a0c84aae20fe10f40' into ↵bjorn3-7/+6
sync_cg_clif-2023-10-09
2023-09-26subst -> instantiatelcnr-1/+1
2023-08-28Don't ICE on layout computation failureKatherine Philip-1/+1
2023-08-05Fix ICE failed to get layout for ReferencesErroryukang-1/+1
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-1/+1
2023-06-15Merge commit '8830dccd1d4c74f1f69b0d3bd982a3f1fcde5807' into ↵bjorn3-3/+3
sync_cg_clif-2023-06-15
2023-06-01Use translatable diagnostics in `rustc_const_eval`Deadbeef-12/+4
2023-05-29EarlyBinder::new -> EarlyBinder::bindlcnr-1/+1
2023-05-28Replace EarlyBinder(x) with EarlyBinder::new(x)Kyle Matsuda-1/+1
2023-05-25Remove ExpnKind::Inlined.Camille GILLOT-5/+1
2023-05-06use EarlyBinder in tcx.(try_)subst_mir_and_normalize_erasing_regionsKyle Matsuda-1/+1
2023-05-03Restrict `From<S>` for `{D,Subd}iagnosticMessage`.Nicholas Nethercote-2/+2
Currently a `{D,Subd}iagnosticMessage` can be created from any type that impls `Into<String>`. That includes `&str`, `String`, and `Cow<'static, str>`, which are reasonable. It also includes `&String`, which is pretty weird, and results in many places making unnecessary allocations for patterns like this: ``` self.fatal(&format!(...)) ``` This creates a string with `format!`, takes a reference, passes the reference to `fatal`, which does an `into()`, which clones the reference, doing a second allocation. Two allocations for a single string, bleh. This commit changes the `From` impls so that you can only create a `{D,Subd}iagnosticMessage` from `&str`, `String`, or `Cow<'static, str>`. This requires changing all the places that currently create one from a `&String`. Most of these are of the `&format!(...)` form described above; each one removes an unnecessary static `&`, plus an allocation when executed. There are also a few places where the existing use of `&String` was more reasonable; these now just use `clone()` at the call site. As well as making the code nicer and more efficient, this is a step towards possibly using `Cow<'static, str>` in `{D,Subd}iagnosticMessage::{Str,Eager}`. That would require changing the `From<&'a str>` impls to `From<&'static str>`, which is doable, but I'm not yet sure if it's worthwhile.
2023-04-29Merge commit 'ef07e8e60f994ec014d049a95591426fb92ebb79' into ↵bjorn3-20/+6
sync_cg_clif-2023-04-29
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-03-15Merge commit 'dec0daa8f6d0a0e1c702f169abb6bf3eee198c67' into ↵bjorn3-1/+1
sync_cg_clif-2023-03-15
2023-02-22Remove type-traversal trait aliasesAlan Egerton-1/+1
2023-02-09Merge commit '7d53619064ab7045c383644cb445052d2a3d46db' into ↵bjorn3-0/+38
sync_cg_clif-2023-02-09
2023-01-27Auto merge of #107269 - bjorn3:sync_cg_clif-2023-01-24, r=bjorn3bors-0/+9
Sync rustc_codegen_cranelift For cg_clif itself there have been a couple of bug fixes since the last sync, a Cranelift update and implemented all remaining simd platform intrinsics used by `std::simd`. (`std::arch` still misses a lot though) Most of the diff is from reworking of the cg_clif build system though. r? `@ghost` `@rustbot` label +A-codegen +A-cranelift +T-compiler
2023-01-24Merge commit '598f0909568a51de8a2d1148f55a644fd8dffad0' into ↵bjorn3-0/+9
sync_cg_clif-2023-01-24
2023-01-22abi: add `AddressSpace` field to `Primitive::Pointer`Erik Desjardins-1/+2
...and remove it from `PointeeInfo`, which isn't meant for this. There are still various places (marked with FIXMEs) that assume all pointers have the same size and alignment. Fixing this requires parsing non-default address spaces in the data layout string, which will be done in a followup.
2022-12-14Merge commit '2bb3996244cf1b89878da9e39841e9f6bf061602' into ↵bjorn3-1/+10
sync_cg_clif-2022-12-14
2022-08-24Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into ↵bjorn3-7/+39
sync_cg_clif-2022-08-24
2022-05-15Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into ↵bjorn3-14/+38
sync_cg_clif-2022-05-15
2022-04-05Mark scalar layout unions so that backends that do not support partially ↵Oli Scherer-1/+1
initialized scalars can special case them.
2022-03-11Improve `AdtDef` interning.Nicholas Nethercote-1/+1
This commit makes `AdtDef` use `Interned`. Much the commit is tedious changes to introduce getter functions. The interesting changes are in `compiler/rustc_middle/src/ty/adt.rs`.
2022-02-21use `List<Ty<'tcx>>` for tupleslcnr-4/+3
2022-02-15Overhaul `TyS` and `Ty`.Nicholas Nethercote-2/+2
Specifically, change `Ty` from this: ``` pub type Ty<'tcx> = &'tcx TyS<'tcx>; ``` to this ``` pub struct Ty<'tcx>(Interned<'tcx, TyS<'tcx>>); ``` There are two benefits to this. - It's now a first class type, so we can define methods on it. This means we can move a lot of methods away from `TyS`, leaving `TyS` as a barely-used type, which is appropriate given that it's not meant to be used directly. - The uniqueness requirement is now explicit, via the `Interned` type. E.g. the pointer-based `Eq` and `Hash` comes from `Interned`, rather than via `TyS`, which wasn't obvious at all. Much of this commit is boring churn. The interesting changes are in these files: - compiler/rustc_middle/src/arena.rs - compiler/rustc_middle/src/mir/visit.rs - compiler/rustc_middle/src/ty/context.rs - compiler/rustc_middle/src/ty/mod.rs Specifically: - Most mentions of `TyS` are removed. It's very much a dumb struct now; `Ty` has all the smarts. - `TyS` now has `crate` visibility instead of `pub`. - `TyS::make_for_test` is removed in favour of the static `BOOL_TY`, which just works better with the new structure. - The `Eq`/`Ord`/`Hash` impls are removed from `TyS`. `Interned`s impls of `Eq`/`Hash` now suffice. `Ord` is now partly on `Interned` (pointer-based, for the `Equal` case) and partly on `TyS` (contents-based, for the other cases). - There are many tedious sigil adjustments, i.e. adding or removing `*` or `&`. They seem to be unavoidable.
2021-12-30Merge commit '40b00f4200fbdeefd11815398cb46394b8cb0a5e' into ↵bjorn3-1/+1
sync_cg_clif-2021-12-30
2021-12-20Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into ↵bjorn3-6/+2
sync_cg_clif-2021-12-20
2021-09-18Querify `fn_abi_of_{fn_ptr,instance}`.Eduard-Mihai Burtescu-2/+2
2021-09-18ty::layout: replicate `layout_of` setup for `fn_abi_of_{fn_ptr,instance}`.Eduard-Mihai Burtescu-1/+54
2021-09-18ty::layout: intern `FnAbi`s as `&'tcx`.Eduard-Mihai Burtescu-1/+1
2021-09-02ty::layout: split `LayoutOf` into required and (blanket) provided halves.Eduard-Mihai Burtescu-3/+3
2021-09-02ty::layout: implement `layout_of` automatically as a default method.Eduard-Mihai Burtescu-11/+11
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-4/+2
2021-08-27rustc_target: add lifetime parameter to `LayoutOf`.Eduard-Mihai Burtescu-2/+2
2021-07-07Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into ↵bjorn3-1/+0
sync_cg_clif-2021-07-07
2021-06-28Update other codegens to use tcx managed vtable allocations.Charles Lew-1/+1
2021-05-27Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into ↵bjorn3-11/+2
sync_cg_clif-2021-05-27
2021-05-05Use local and remapped paths where appropriateAndy Wang-1/+3
2021-04-30Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795'Erin Power-9/+11
2021-03-29Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into ↵bjorn3-2/+1
sync_cg_clif-2021-03-29
2021-03-05Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into ↵bjorn3-90/+21
sync_cg_clif-2021-03-05
2021-02-01Merge commit 'd556c56f792756dd7cfec742b9f2e07612dc10f4' into ↵bjorn3-10/+47
sync_cg_clif-2021-02-01
2020-11-27Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into ↵bjorn3-2/+2
sync_cg_clif-2020-11-27