about summary refs log tree commit diff
path: root/src/test/mir-opt/inline
AgeCommit message (Collapse)AuthorLines
2022-04-14Update inline-into-box-place test outputEduardo Sánchez Muñoz-2/+2
2022-04-11Fix tests broken by deaggregation changeJakob Degen-1/+19
2022-04-05kill temp earlyouz-a-1/+1
2022-04-04destroy temp at the end and avoid ICEouz-a-2/+2
2022-04-04fixed error, made function leaner and tighterouz-a-49/+26
2022-04-04New mir-opt deref_separatorouz-a-18/+49
2022-03-24Check if call return type is visibly uninhabited when building MIRTomasz Miąsko-25/+24
2022-03-09normalization change and rebaseb-naber-22/+2
2022-03-09bless testsb-naber-8/+30
2022-02-27Only create a single expansion for each inline integration.Camille GILLOT-196/+196
2022-02-22change `mir::Constant` in mir dumpslcnr-32/+17
2022-01-21Override rustc version in ui and mir-opt tests to get stable hashesThe 8472-2/+2
Building a dozen separate regexps for each test in compiletest consumes significant amounts of CPU cycles. Using `RUSTC_FORCE_INCR_COMP_ARTIFACT_HEADER` stabilizes hashes calcuated for the individual tests so no test-dependent normalization is needed. Hashes for the standard library still change so some normalizations are still needed.
2022-01-15initial revertEllen-2/+2
2021-12-13Include rustc version in `rustc_span::StableCrateId`pierwill-2/+2
Normalize symbol hashes in compiletest. Remove DefId sorting
2021-11-23Fix printing unit return ty, don't elaborate FnOnce unless we see itMichael Goulet-8/+8
2021-11-23Update test outputsMichael Goulet-8/+8
2021-10-17Ignore wasm32 in test.Camille GILLOT-1/+1
2021-10-17Normalize MIR with RevealAll before optimizations.Camille GILLOT-4/+146
2021-09-30Auto merge of #89110 - Aaron1011:adjustment-span, r=estebankbors-18/+18
Use larger span for adjustment THIR expressions Currently, we use a relatively 'small' span for THIR expressions generated by an 'adjustment' (e.g. an autoderef, autoborrow, unsizing). As a result, if a borrow generated by an adustment ends up causing a borrowcheck error, for example: ```rust let mut my_var = String::new(); let my_ref = &my_var my_var.push('a'); my_ref; ``` then the span for the mutable borrow may end up referring to only the base expression (e.g. `my_var`), rather than the method call which triggered the mutable borrow (e.g. `my_var.push('a')`) Due to a quirk of the MIR borrowck implementation, this doesn't always get exposed in migration mode, but it does in many cases. This commit makes THIR building consistently use 'larger' spans for adjustment expressions. These spans are recoded when we first create the adjustment during typecheck. For example, an autoref adjustment triggered by a method call will record the span of the entire method call. The intent of this change it make it clearer to users when it's the specific way in which a variable is used (for example, in a method call) that produdes a borrowcheck error. For example, an error message claiming that a 'mutable borrow occurs here' might be confusing if it just points at a usage of a variable (e.g. `my_var`), when no `&mut` is in sight. Pointing at the entire expression should help to emphasize that the method call itself is responsible for the mutable borrow. In several cases, this makes the `#![feature(nll)]` diagnostic output match up exactly with the default (migration mode) output. As a result, several `.nll.stderr` files end up getting removed entirely.
2021-09-25Use larger span for adjustments on method callsAaron Hill-18/+18
Currently, we use a relatively 'small' span for THIR expressions generated by an 'adjustment' (e.g. an autoderef, autoborrow, unsizing). As a result, if a borrow generated by an adustment ends up causing a borrowcheck error, for example: ```rust let mut my_var = String::new(); let my_ref = &my_var my_var.push('a'); my_ref; ``` then the span for the mutable borrow may end up referring to only the base expression (e.g. `my_var`), rather than the method call which triggered the mutable borrow (e.g. `my_var.push('a')`) Due to a quirk of the MIR borrowck implementation, this doesn't always get exposed in migration mode, but it does in many cases. This commit makes THIR building consistently use 'larger' spans for adjustment expressions The intent of this change it make it clearer to users when it's the specific way in which a variable is used (for example, in a method call) that produdes a borrowcheck error. For example, an error message claiming that a 'mutable borrow occurs here' might be confusing if it just points at a usage of a variable (e.g. `my_var`), when no `&mut` is in sight. Pointing at the entire expression should help to emphasize that the method call itself is responsible for the mutable borrow. In several cases, this makes the `#![feature(nll)]` diagnostic output match up exactly with the default (migration mode) output. As a result, several `.nll.stderr` files end up getting removed entirely.
2021-09-25Bless testsGary Guo-46/+74
2021-09-18./x.py test --blessTomasz Miąsko-1/+1
2021-09-01Fix drop handling for `if let` expressionsMatthew Jasper-1/+1
MIR lowering for `if let` expressions is now more complicated now that `if let` exists in HIR. This PR adds a scope for the variables bound in an `if let` expression and then uses an approach similar to how we handle loops to ensure that we reliably drop the correct variables.
2021-08-26update mir diffslcnr-2/+2
2021-07-06Revert "Revert "Update mir opt tests""bjorn3-2/+2
This reverts commit 8d5fb5bf7d5c63dcfaea381e00ded67c21fab3a3.
2021-06-12Pretty print generator witness only in `-Zverbose` modeTomasz Miąsko-8/+8
In release build of deeply-nested-async benchmark the size of `no-opt.bc` file is reduced from 46MB to 62kB.
2021-06-07Revert "Update mir opt tests"bjorn3-2/+2
This reverts commit e0e0cfa6492292d0b905b07a4ed727f4e1aefc80.
2021-05-30Update mir opt testsbjorn3-2/+2
2021-05-17mir-opt bless for Size field being removed from AllocationRalf Jung-6/+6
2021-03-31Make unevaluated DefId rendering deterministicOli Scherer-2/+2
2021-03-23Auto merge of #83177 - erikdesjardins:zstassign, r=oli-obkbors-1/+0
Remove assignments to ZST places instead of marking ZST return place as unused partially reverts #83118 requested by `@tmiasko` in https://github.com/rust-lang/rust/pull/83118#issuecomment-799692574 r? `@oli-obk`
2021-03-20bless mir-opt testslcnr-4/+4
2021-03-17Auto merge of #82122 - bstrie:dep4real, r=dtolnaybors-5/+5
Deprecate `intrinsics::drop_in_place` and `collections::Bound`, which accidentally weren't deprecated Fixes #82080. I've taken the liberty of updating the `since` values to 1.52, since an unobservable deprecation isn't much of a deprecation (even the detailed release notes never bothered to mention these deprecations). As mentioned in the issue I'm *pretty* sure that using a type alias for `Bound` is semantically equivalent to the re-export; [the reference implies](https://doc.rust-lang.org/reference/items/type-aliases.html) that type aliases only observably differ from types when used on unit structs or tuple structs, whereas `Bound` is an enum.
2021-03-15bless testsErik Desjardins-1/+0
2021-03-13bless testsErik Desjardins-2/+0
2021-03-13Move ZST check inside UsedLocalsSimon Vandel Sillesen-0/+1
2021-03-13Extend SimplifyLocals to remove ZST writesSimon Vandel Sillesen-6/+0
2021-03-09Deprecate items that accidentally weren't deprecatedbstrie-5/+5
Fixes #82080
2021-03-06Disable destination propagation on all mir-opt-levelsTomasz Miąsko-26/+44
2021-03-05Bump mir-opt-level from 3 to 4 in testsSantiago Pastorino-2/+2
2021-02-21New pass to deduplicate blocksSimon Vandel Sillesen-1/+1
2021-02-06Rollup merge of #81753 - tmiasko:inline-instruction-set, r=oli-obkMara Bos-0/+146
Never MIR inline functions with a different instruction set
2021-02-04Revert "Avoid leaking block expression values"Felix S. Klock II-6/+5
This reverts commit 4fef39113a514bb270f5661a82fdba17d3e41dbb.
2021-02-05Never MIR inline functions with a different instruction setTomasz Miąsko-0/+146
2021-01-25Ignore a test on wasm, because that changes landing padsoli-37/+39
2021-01-23Move test to mir-opt so we actually see that no inlining is happeningoli-0/+108
2021-01-23Prevent query cycles during inliningoli-0/+69
2021-01-18Remove disabled transformation from instcombineTomasz Miąsko-1/+1
2021-01-07Reintroduce hir::ExprKind::IfCaio-13/+13
2020-12-04Avoid leaking block expression valuesMatthew Jasper-5/+6