summary refs log tree commit diff
path: root/src/test/mir-opt/inline
AgeCommit message (Collapse)AuthorLines
2022-06-15fix inline_into_box_place testDrMeepster-19/+23
2022-06-15remove box derefs from codgenDrMeepster-23/+39
2022-06-14fix wrong evaluation in clippyb-naber-4/+4
2022-06-14address reviewb-naber-4/+4
2022-06-14manually bless 32-bit mir-opt testsb-naber-6/+6
2022-06-14implement valtrees as the type-system representation for constant valuesb-naber-6/+6
2022-05-30validate derefer, run derefer inside generatorouz-a-3/+119
2022-05-23Refactor call terminator to always hold a destination placeJakob Degen-28/+24
2022-05-13Rollup merge of #96989 - cjgillot:defpath-use, r=davidtwcoMatthias Krüger-18/+94
Be more precise than DefPathData::Misc. This variant was used for two unrelated things. Let's make this cleaner.
2022-05-12Bless mir-opt tests.Camille GILLOT-18/+94
2022-05-12Add mir-opt test.Camille GILLOT-0/+157
2022-05-06bless mir-optRalf Jung-3/+3
2022-05-04Generate an intermediate temporary for `Drop` constants.Oli Scherer-4/+12
To limit the fallout from this, don't do this for the last (or only) operand in an rvalue.
2022-04-25Auto merge of #96116 - ouz-a:mir-opt, r=oli-obkbors-2/+10
Make derefer work everwhere Follow up work on previous PR's #95649 and #95857. r? rust-lang/mir-opt _Co-Authored-By: `@oli-obk_`
2022-04-20Rollup merge of #93313 - tmiasko:uninhabited, r=tmandryDylan DPC-25/+24
Check if call return type is visibly uninhabited when building MIR The main motivation behind the change is to expose information about diverging calls to the generator transform and match the precision of drop range tracking which already understands that call expressions with visibly uninhabited types diverges. This change should also accept strictly more programs than before. That is programs that were previously rejected due to errors raised by control-flow sensitive checks in a code that is no longer considered reachable. Fixes #93161.
2022-04-16fix CI errouz-a-0/+1
2022-04-16Make derefer work everwhereouz-a-3/+10
Co-Authored-By: Oli Scherer <332036+oli-obk@users.noreply.github.com>
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.