about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/build/custom/mod.rs
AgeCommit message (Collapse)AuthorLines
2024-12-17Rename `rustc_mir_build::build` to `builder`Zalathar-176/+0
2024-12-15Add hir::AttributeJonathan Dönszelmann-2/+1
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-3/+3
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-09-13Rename and reorder lots of lifetimes.Nicholas Nethercote-5/+4
- Replace non-standard names like 's, 'p, 'rg, 'ck, 'parent, 'this, and 'me with vanilla 'a. These are cases where the original name isn't really any more informative than 'a. - Replace names like 'cx, 'mir, and 'body with vanilla 'a when the lifetime applies to multiple fields and so the original lifetime name isn't really accurate. - Put 'tcx last in lifetime lists, and 'a before 'b.
2024-08-01MIR required_consts, mentioned_items: ensure we do not forget to fill these ↵Ralf Jung-2/+2
lists
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-05coverage: Rename `mir::coverage::BranchInfo` to `CoverageInfoHi`Zalathar-1/+1
This opens the door to collecting and storing coverage information that is unrelated to branch coverage or MC/DC.
2024-05-13Remove `extern crate rustc_middle` from `rustc_mir_build`.Nicholas Nethercote-0/+1
2024-04-03Remove MIR unsafe checkMatthew Jasper-4/+1
This also remove safety information from MIR.
2024-03-25Auto merge of #122721 - oli-obk:merge_queries, r=davidtwcobors-1/+1
Replace `mir_built` query with a hook and use mir_const everywhere instead A small perf improvement due to less dep graph handling. Mostly just a cleanup to get rid of one of our many mir queries
2024-03-20collector: recursively traverse 'mentioned' items to evaluate their constantsRalf Jung-0/+1
2024-03-20Replace `mir_built` query with a hook and use mir_const everywhere insteadOli Scherer-1/+1
2024-03-14coverage: Data structures for recording branch info during MIR buildingZalathar-0/+1
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-12-18Rename `Session::span_diagnostic` as `Session::dcx`.Nicholas Nethercote-1/+1
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-14Custom MIR: Support cleanup blocksTomasz Miąsko-0/+13
Cleanup blocks are declared with `bb (cleanup) = { ... }`. `Call` and `Drop` terminators take an additional argument describing the unwind action, which is one of the following: * `UnwindContinue()` * `UnwindUnreachable()` * `UnwindTerminate(reason)`, where reason is `ReasonAbi` or `ReasonInCleanup` * `UnwindCleanup(block)` Also support unwind resume and unwind terminate terminators: * `UnwindResume()` * `UnwindTerminate(reason)`
2023-10-20s/generator/coroutine/Oli Scherer-1/+1
2023-10-18coverage: Attach an optional `FunctionCoverageInfo` to `mir::Body`Zalathar-0/+1
This allows coverage information to be attached to the function as a whole when appropriate, instead of being smuggled through coverage statements in the function's basic blocks. As an example, this patch moves the `function_source_hash` value out of individual `CoverageKind::Counter` statements and into the per-function info. When synthesizing unused functions for coverage purposes, the absence of this info is taken to indicate that a function was not eligible for coverage and should not be synthesized.
2023-06-26make custom mir ICE a bit nicerMatthias Krüger-1/+5
2023-04-24Split `{Idx, IndexVec, IndexSlice}` into their own modulesMaybe Waffle-1/+1
2023-04-02Use `&IndexSlice` instead of `&IndexVec` where possibleScott McMurray-3/+3
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-01-17Don't call closures immediately, use `try{}` blocksMaybe Waffle-3/+3
2022-12-14Support common enum operations in custom mirJakob Degen-1/+3
2022-12-13Ensure valid local_data is set for custom mir buildingGary Guo-1/+6
MIR unsafety checking requires this to be valid
2022-12-04Auto merge of #105121 - oli-obk:simpler-cheaper-dump_mir, r=nnethercotebors-1/+1
Cheaper `dump_mir` take two alternative to #105083 r? `@nnethercote`
2022-12-02Use zero based indexing for pass_countOli Scherer-1/+1
2022-11-29Improve spans in custom mirJakob Degen-2/+2
2022-11-08Add support for custom MIR parsingJakob Degen-0/+155