about summary refs log tree commit diff
path: root/compiler/rustc_smir/src
AgeCommit message (Collapse)AuthorLines
2023-10-10Rollup merge of #116560 - ouz-a:efficient_ids, r=oli-obkGuillaume Gomez-32/+47
In smir use `FxIndexMap` to store indexed ids Previously we used `vec` for storing indexed types, which is fine for small cases but will lead to huge performance issues when we use `smir` for real world cases. Addresses https://github.com/rust-lang/project-stable-mir/issues/35 r? ``@oli-obk``
2023-10-10add new wrapper for FxIndexMapOğuz Ağcayazı-32/+42
2023-10-09spans are now indexmappedOğuz Ağcayazı-11/+9
2023-10-09alloc id is indexmappedOğuz Ağcayazı-8/+9
2023-10-09defids are indexmappedOğuz Ağcayazı-11/+17
2023-10-09return crates instead of a crateOğuz Ağcayazı-5/+12
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+3
2023-10-06Remove unnecessary `pub`.Nicholas Nethercote-1/+1
2023-10-06Remove unneeded features.Nicholas Nethercote-4/+0
2023-10-05impl stable for kindsOğuz Ağcayazı-114/+114
2023-10-05add span to statementsouz-a-52/+71
2023-09-30add span to terminatorouz-a-38/+69
2023-09-30create localdecl and add span to itouz-a-1/+8
2023-09-28remove unimplementedouz-a-1/+1
2023-09-28add real folder to Regionouz-a-1/+1
2023-09-28remove un-needed variantsouz-a-7/+2
2023-09-28fix importsouz-a-8/+3
2023-09-28add stable for RegionKindouz-a-11/+26
2023-09-28add RegionDefouz-a-1/+31
2023-09-25Rebase falloutOli Scherer-1/+1
2023-09-25Split out the stable part of smir into its own crate to prevent accidental ↵Oli Scherer-1662/+11
usage of forever unstable things
2023-09-25Move `Opaque` to `stable_mir`Oli Scherer-38/+35
2023-09-25Fix test by adding a stable way to get an opaque DefKindOli Scherer-0/+23
2023-09-25Eliminate escape hatchOli Scherer-12/+23
2023-09-25Eliminate `with_tables` helperOli Scherer-78/+18
2023-09-24Remove span from BrAnon.Camille GILLOT-5/+3
2023-09-23Remove GeneratorWitness and rename GeneratorWitnessMIR.Camille GILLOT-5/+1
2023-09-21Rollup merge of #115972 - RalfJung:const-consistency, r=oli-obkGuillaume Gomez-7/+7
rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::Const Also, be more consistent with the `to/eval_bits` methods... we had some that take a type and some that take a size, and then sometimes the one that takes a type is called `bits_for_ty`. Turns out that `ty::Const`/`mir::ConstKind` carry their type with them, so we don't need to even pass the type to those `eval_bits` functions at all. However this is not properly consistent yet: in `ty` we have most of the methods on `ty::Const`, but in `mir` we have them on `mir::ConstKind`. And indeed those two types are the ones that correspond to each other. So `mir::ConstantKind` should actually be renamed to `mir::Const`. But what to do with `mir::Constant`? It carries around a span, that's really more like a constant operand that appears as a MIR operand... it's more suited for `syntax.rs` than `consts.rs`, but the bigger question is, which name should it get if we want to align the `mir` and `ty` types? `ConstOperand`? `ConstOp`? `Literal`? It's not a literal but it has a field called `literal` so it would at least be consistently wrong-ish... ``@oli-obk`` any ideas?
2023-09-21rename mir::Constant -> mir::ConstOperand, mir::ConstKind -> mir::ConstRalf Jung-7/+7
2023-09-19adjust constValue::Slice to work for arbitrary slice typesRalf Jung-8/+6
2023-09-19move ConstValue into mirRalf Jung-1/+4
this way we have mir::ConstValue and ty::ValTree as reasonably parallel
2023-09-14Rollup merge of #115772 - ouz-a:smir_span2, r=oli-obkMatthias Krüger-8/+34
Improve Span in smir Addressing https://github.com/rust-lang/project-stable-mir/issues/31 r? ``@oli-obk``
2023-09-14make it more clear which functions create fresh AllocIdRalf Jung-1/+1
2023-09-14cleanup op_to_const a bit; rename ConstValue::ByRef → IndirectRalf Jung-1/+1
2023-09-14use AllocId instead of Allocation in ConstValue::ByRefRalf Jung-1/+2
2023-09-14span is indexouz-a-8/+34
2023-09-13Auto merge of #115793 - spastorino:smir-explicit-predicates-of, r=oli-obkbors-0/+22
Add explicit_predicates_of to SMIR Adding `explicit_predicates_of` so we can use it from Mir formality. r? `@oli-obk`
2023-09-12Add explicit_predicates_of to SMIRSantiago Pastorino-0/+22
2023-09-11Rollup merge of #115749 - oli-obk:smir_consts, r=compiler-errorsMatthias Krüger-1/+1
Allow loading the SMIR for constants and statics cc https://github.com/rust-lang/project-stable-mir/issues/34 before this PR we were ICEing when trying to access the SMIR of anything other than functions
2023-09-11Rollup merge of #115730 - bjorn3:some_driver_refactors, r=compiler-errorsMatthias Krüger-2/+0
Some more small driver refactors To improve clarity and simplify some code.
2023-09-11Rollup merge of #115727 - fee1-dead-contrib:effect-fallback, r=oli-obkMatthias Krüger-1/+1
Implement fallback for effect param r? `@oli-obk` or `@lcnr` tracking issue for this ongoing work: https://github.com/rust-lang/rust/issues/110395
2023-09-11add `is_host_effect` to `GenericParamDefKind::Const` and address reviewDeadbeef-1/+1
2023-09-11Allow loading the SMIR for constants and staticsOli Scherer-1/+1
2023-09-10Remove EarlyErrorHandler argument from after_analysis callbackbjorn3-2/+0
It is only used by miri which can create a new one using the Session.
2023-09-09add function that returns span of an itemouz-a-0/+11
2023-09-06Rollup merge of #115605 - ouz-a:smir_better_debug, r=oli-obkMatthias Krüger-1/+8
Better Debug for `Ty` in smir Similar to what I did here https://github.com/rust-lang/rust/pull/115534. r? ``@oli-obk``
2023-09-06Ty Debug now prints id and kindouz-a-1/+8
2023-09-06Implement and test monomorphizationOli Scherer-2/+63
2023-09-06Allow fetching the SMIR body of FnDefsOli Scherer-5/+15
2023-09-06Deopaquify `ParamConst`Oli Scherer-11/+26