| Age | Commit message (Collapse) | Author | Lines | |
|---|---|---|---|---|
| 2025-10-02 | mir-opt: Eliminate dead statements even if they are used by debuginfos | dianqk | -4/+2 | |
| 2025-10-02 | mir-opt: Eliminate trivial unnecessary storage annotations | dianqk | -8/+2 | |
| 2025-10-02 | mir-opt: Eliminate dead ref statements | dianqk | -0/+90 | |
| 2025-07-23 | Give an AllocId to ConstValue::Slice. | Camille GILLOT | -0/+8 | |
| 2025-04-08 | Do not optimize out SwitchInt before borrowck, or if Zmir-preserve-ub | Michael Goulet | -1/+1 | |
| 2024-08-18 | Bless *all* the mir-opt tests | Scott McMurray | -13/+13 | |
| 2024-08-18 | Update mir-opt filechecks | Scott McMurray | -2/+2 | |
| 2024-06-03 | Reformat `mir!` macro invocations to use braces. | Nicholas Nethercote | -4/+4 | |
| The `mir!` macro has multiple parts: - An optional return type annotation. - A sequence of zero or more local declarations. - A mandatory starting anonymous basic block, which is brace-delimited. - A sequence of zero of more additional named basic blocks. Some `mir!` invocations use braces with a "block" style, like so: ``` mir! { let _unit: (); { let non_copy = S(42); let ptr = std::ptr::addr_of_mut!(non_copy); // Inside `callee`, the first argument and `*ptr` are basically // aliasing places! Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) } after_call = { Return() } } ``` Some invocations use parens with a "block" style, like so: ``` mir!( let x: [i32; 2]; let one: i32; { x = [42, 43]; one = 1; x = [one, 2]; RET = Move(x); Return() } ) ``` And some invocations uses parens with a "tighter" style, like so: ``` mir!({ SetDiscriminant(*b, 0); Return() }) ``` This last style is generally used for cases where just the mandatory starting basic block is present. Its braces are placed next to the parens. This commit changes all `mir!` invocations to use braces with a "block" style. Why? - Consistency is good. - The contents of the invocation is a block of code, so it's odd to use parens. They are more normally used for function-like macros. - Most importantly, the next commit will enable rustfmt for `tests/mir-opt/`. rustfmt is more aggressive about formatting macros that use parens than macros that use braces. Without this commit's changes, rustfmt would break a couple of `mir!` macro invocations that use braces within `tests/mir-opt` by inserting an extraneous comma. E.g.: ``` mir!(type RET = (i32, bool);, { // extraneous comma after ';' RET.0 = 1; RET.1 = true; Return() }) ``` Switching those `mir!` invocations to use braces avoids that problem, resulting in this, which is nicer to read as well as being valid syntax: ``` mir! { type RET = (i32, bool); { RET.0 = 1; RET.1 = true; Return() } } ``` | ||||
| 2024-04-20 | mir-opt tests: rename unit-test -> test-mir-pass | Ralf Jung | -4/+4 | |
| 2024-04-03 | rename `expose_addr` to `expose_provenance` | joboet | -4/+4 | |
| 2024-02-22 | [AUTO_GENERATED] Migrate compiletest to use `ui_test`-style `//@` directives | 许杰友 Jieyou Xu (Joe) | -8/+8 | |
| 2024-01-11 | Do not run simplify_locals inside DSE. | Camille GILLOT | -5/+9 | |
| The full pass is run short after. | ||||
| 2024-01-11 | Sandwich MIR optimizations between DSE. | Camille GILLOT | -35/+51 | |
| 2023-12-26 | custom mir: make it clear what the return block is | Ralf Jung | -3/+3 | |
| 2023-11-14 | Custom MIR: Support cleanup blocks | Tomasz Miąsko | -3/+3 | |
| 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-19 | Allow to run filecheck in mir-opt tests. | Camille GILLOT | -0/+4 | |
| 2023-10-06 | Preserve DebugInfo in DeadStoreElimination. | Camille GILLOT | -155/+57 | |
| 2023-08-23 | Do not convert copies of packed projections to moves. | Camille GILLOT | -0/+56 | |
| 2023-07-19 | Turn copy into moves during DSE. | Camille GILLOT | -0/+61 | |
| 2023-06-23 | Bless tests | Gary Guo | -2/+2 | |
| 2023-06-15 | Remove comments from mir-opt MIR dumps | Ben Kimock | -147/+135 | |
| 2023-06-12 | bless mir-opt | Pietro Albini | -0/+76 | |
| To reproduce the changes in this commit locally: - Run `./x test tidy` and remove all the output files not associated with a test file anymore, as reported by tidy. - Run `./x test tests/mir-opt --bless` to generate the new outputs. | ||||
| 2023-06-12 | properly mark tests that require panic=abort | Pietro Albini | -1/+1 | |
| 2023-04-29 | Make PlaceMention a non-mutating use. | Camille GILLOT | -7/+7 | |
| 2023-04-29 | Add test. | Camille GILLOT | -0/+34 | |
| 2023-04-06 | Ignore many tests on wasm32 | Gary Guo | -1/+2 | |
| 2023-01-11 | Move /src/test to /tests | Albert Larsan | -0/+165 | |
