summary refs log tree commit diff
path: root/compiler/rustc_codegen_cranelift/src/base.rs
AgeCommit message (Collapse)AuthorLines
2022-10-27Update toolingMaybe Waffle-5/+1
2022-10-23Merge commit '266e96785ab71834b917bf474f130a6d8fdecd4b' into ↵bjorn3-5/+7
sync_cg_clif-2022-10-23
2022-10-06Remove `mir::CastKind::Misc`ouz-a-1/+6
2022-09-16Revert "Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, ↵Oli Scherer-0/+1
r=estebank"" This reverts commit 4a742a691e7dd2522bad68b86fe2fd5a199d5561.
2022-09-12Make x.py check workEric Holk-0/+4
2022-09-06Generalize the Assume intrinsic statement to a general Intrinsic statementOli Scherer-16/+25
2022-09-06Lower the assume intrinsic to a MIR statementOli Scherer-0/+2
2022-08-31Rollup merge of #100730 - CleanCut:diagnostics-rustc_monomorphize, r=davidtwcoRalf Jung-2/+5
Migrate rustc_monomorphize to use SessionDiagnostic ### Description - Migrates diagnostics in `rustc_monomorphize` to use `SessionDiagnostic` - Adds an `impl IntoDiagnosticArg for PathBuf` ### TODO / Help! - [x] I'm having trouble figuring out how to apply an optional note. 😕 Help!? - Resolved. It was bad docs. Fixed in https://github.com/rust-lang/rustc-dev-guide/pull/1437/files - [x] `errors:RecursionLimit` should be `#[fatal ...]`, but that doesn't exist so it's `#[error ...]` at the moment. - Maybe I can switch after this is merged in? --> https://github.com/rust-lang/rust/pull/100694 - Or maybe I need to manually implement `SessionDiagnostic` instead of deriving it? - [x] How does one go about converting an error inside of [a call to struct_span_lint_hir](https://github.com/rust-lang/rust/blob/8064a495086c2e63c0ef77e8e82fe3b9b5dc535f/compiler/rustc_monomorphize/src/collector.rs#L917-L927)? - [x] ~What placeholder do you use in the fluent template to refer to the value in a vector? It seems like [this code](https://github.com/rust-lang/rust/blob/0b79f758c9aa6646606662a6d623a0752286cd17/compiler/rustc_macros/src/diagnostics/diagnostic_builder.rs#L83-L114) ought to have the answer (or something near it)...but I can't figure it out.~ You can't. Punted.
2022-08-26Replace `Body::basic_blocks()` with field accessTomasz Miąsko-2/+2
2022-08-25adjust to new error valueNathan Stocks-2/+5
2022-08-24Merge commit 'e9d1a0a7b0b28dd422f1a790ccde532acafbf193' into ↵bjorn3-118/+109
sync_cg_clif-2022-08-24
2022-07-25Merge commit 'c19edfd71a1d0ddef86c2c67fdb40718d40a72b4' into ↵bjorn3-10/+29
sync_cg_clif-2022-07-25
2022-07-20Revert "Rollup merge of #98582 - oli-obk:unconstrained_opaque_type, r=estebank"Oli Scherer-1/+0
This reverts commit 6f8fb911ad504b77549cf3256a09465621beab9d, reversing changes made to 7210e46dc69a4b197a313d093fe145722c248b7d.
2022-07-15Introduce opaque type to hidden type projectionOli Scherer-0/+1
2022-07-12add new rval, pull deref earlyouz-a-0/+5
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-14Rename the `ConstS::val` field as `kind`.Nicholas Nethercote-1/+1
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.
2022-06-02add cast kind of from_exposed_addr (int-to-ptr casts)Ralf Jung-1/+3
2022-06-01rename PointerAddress → PointerExposeAddressRalf Jung-1/+5
2022-05-31Add a pointer to address cast kindTomasz Miąsko-1/+1
A pointer to address cast are often special-cased. Introduce a dedicated cast kind to make them easy distinguishable.
2022-05-23Refactor call terminator to always hold a destination placeJakob Degen-0/+2
2022-05-15Merge commit '63734fcdd718cca089f84c42f3a42c0096cfd431' into ↵bjorn3-8/+18
sync_cg_clif-2022-05-15
2022-04-22Merge commit 'f2cdd4a78d89c009342197cf5844a21f8aa813df' into ↵bjorn3-1/+2
sync_cg_clif-2022-04-22
2022-04-11Add new `Deinit` statement kindJakob Degen-0/+1
2022-03-20Merge commit '370c397ec9169809e5ad270079712e0043514240' into ↵bjorn3-12/+23
sync_cg_clif-2022-03-20
2022-02-23Merge commit '35d9c6bf256968e1b40e0d554607928bdf9cebea' into ↵bjorn3-16/+40
sync_cg_clif-2022-02-23
2022-02-15Overhaul `Const`.Nicholas Nethercote-1/+1
Specifically, rename the `Const` struct as `ConstS` and re-introduce `Const` as this: ``` pub struct Const<'tcx>(&'tcx Interned<ConstS>); ``` This now matches `Ty` and `Predicate` more closely, including using pointer-based `eq` and `hash`. Notable changes: - `mk_const` now takes a `ConstS`. - `Const` was copy, despite being 48 bytes. Now `ConstS` is not, so need a we need separate arena for it, because we can't use the `Dropless` one any more. - Many `&'tcx Const<'tcx>`/`&Const<'tcx>` to `Const<'tcx>` changes - Many `ct.ty` to `ct.ty()` and `ct.val` to `ct.val()` changes. - Lots of tedious sigil fiddling.
2022-02-15Overhaul `TyS` and `Ty`.Nicholas Nethercote-4/+4
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.
2022-01-12Remove deprecated LLVM-style inline assemblyTomasz Miąsko-12/+0
2022-01-03Rollup merge of #90102 - nbdd0121:box3, r=jonas-schievinkMatthias Krüger-25/+0
Remove `NullOp::Box` Follow up of #89030 and MCP rust-lang/compiler-team#460. ~1 month later nothing seems to be broken, apart from a small regression that #89332 (1aac85bb716c09304b313d69d30d74fe7e8e1a8e) shows could be regained by remvoing the diverging path, so it shall be safe to continue and remove `NullOp::Box` completely. r? `@jonas-schievink` `@rustbot` label T-compiler
2021-12-20Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into ↵bjorn3-11/+7
sync_cg_clif-2021-12-20
2021-12-03cg_cranelift: check may_unwind flag instead of cleanupcynecx-2/+3
2021-12-03LLVM codgen support for unwinding inline assemblycynecx-6/+15
2021-10-20Remove NullOp::BoxGary Guo-25/+0
2021-09-25Introduce `Rvalue::ShallowInitBox`Gary Guo-0/+7
2021-09-18Querify `fn_abi_of_{fn_ptr,instance}`.Eduard-Mihai Burtescu-1/+1
2021-09-18ty::layout: replicate `layout_of` setup for `fn_abi_of_{fn_ptr,instance}`.Eduard-Mihai Burtescu-3/+2
2021-09-13Introduce NullOp::AlignOfGary Guo-3/+8
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-1/+1
2021-08-06Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into ↵bjorn3-2/+0
sync_cg_clif-2021-08-06
2021-07-07Merge commit '3a31c6d8272c14388a34622193baf553636fe470' into ↵bjorn3-4/+21
sync_cg_clif-2021-07-07
2021-05-27Merge commit '40dd3e2b7089b5e96714e064b731f6dbf17c61a9' into ↵bjorn3-7/+6
sync_cg_clif-2021-05-27
2021-04-30Sync rustc_codegen_cranelift 'ddd4ce25535cf71203ba3700896131ce55fde795'Erin Power-111/+35
2021-03-29Merge commit '0969bc6dde001e01e7e1f58c8ccd7750f8a49ae1' into ↵bjorn3-35/+28
sync_cg_clif-2021-03-29
2021-03-09Build StKind::CopyOverlappingkadmin-2/+13
This replaces where it was previously being constructed in intrinsics, with direct construction of the Statement.
2021-03-09Update craneliftkadmin-0/+10
2021-03-08Auto merge of #82727 - oli-obk:shrinkmem, r=pnkfelixbors-2/+2
Test the effect of shrinking the size of Rvalue by 16 bytes r? `@ghost`
2021-03-05Merge commit '9a0c32934ebe376128230aa8da3275697b2053e7' into ↵bjorn3-189/+82
sync_cg_clif-2021-03-05