summary refs log tree commit diff
path: root/compiler/rustc_smir/src
AgeCommit message (Collapse)AuthorLines
2023-11-09rename `BorrowKind::Shallow` to `Fake`lcnr-1/+1
also adds some comments (cherry picked from commit 992d93f687c75f8f5ee69e0fb43bff509c7c9cb8)
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
2023-09-06Add types to all constantsOli Scherer-8/+9
2023-09-06Also use `Const` in `SMIR` instead of just `ConstantKind`Oli Scherer-15/+19
2023-09-06Add type folder to SMIROli Scherer-6/+255
2023-09-05Add tests and use ControlFlowCelina G. Val-34/+34
2023-09-05SMIR: Allow users to pick if compilation continuesCelina G. Val-8/+20
Currently we stop compilation, but some users might want to keep going. This is needed for us to test against rustc tests. Other tools, such as Kani, also implements parts of their logic as a backend so it is important for compilation to continue.
2023-09-05Diferentiate between ICE and compilation errorCelina G. Val-8/+15
2023-09-05Adjust StableMIR interface to return and not crashCelina G. Val-11/+37
Invoking StableMir::run() on a crate that has any compilation error was crashing the entire process. Instead, return a `CompilerError` so the user knows compilation did not succeed. I believe ICE will also be converted to `CompilerError`. I'm also adding a return value to the callback, because I think it will be handy for users (at least it was for my current task of implementing a tool to validate stable-mir). However, if people disagree, I can remove that.
2023-09-04provide more useful info for DefId Debugouz-a-1/+20
2023-09-03Auto merge of #115470 - ericmarkmartin:stable-prov, r=oli-obkbors-7/+28
add stable provenance r? `@spastorino` implements rust-lang/project-stable-mir#22
2023-09-02add stable provenanceEric Mark Martin-7/+28
2023-09-01Create a SMIR visitorOli Scherer-3/+202
2023-08-30Move some logic using rustc datastructures to the `rustc_smir` moduleOli Scherer-131/+135