about summary refs log tree commit diff
path: root/src/test/mir-opt
AgeCommit message (Collapse)AuthorLines
2020-03-26Enable `--bless`ing of MIR dumpsOliver Scherer-138/+795
2020-03-25Rollup merge of #70319 - lcnr:issue63695, r=eddybDylan DPC-1/+2
correctly normalize constants closes #70317 implements https://github.com/rust-lang/rust/issues/70125#issuecomment-602133708 r? eddyb cc @varkor
2020-03-25run test only on 64bitBastian Kauschke-0/+1
2020-03-24update mir opt testBastian Kauschke-1/+1
2020-03-24Rollup merge of #70259 - wesleywiser:use_reveal_all, r=eddybMazdak Farrokhzad-0/+64
Use Reveal::All in MIR optimizations Resolves some code review feedback in #67662. Fixes #68855 r? @eddyb
2020-03-23Rollup merge of #70080 - anyska:mir-double-space, r=oli-obkMazdak Farrokhzad-1/+1
rustc_mir: remove extra space when pretty-printing MIR.
2020-03-21Resolve worsened debug build codegenWesley Wiser-0/+64
2020-03-19Use erased regions in MIRMatthew Jasper-17/+24
2020-03-19Rollup merge of #69814 - jonas-schievink:gen-ret-unw, r=ZoxcMazdak Farrokhzad-0/+34
Smaller and more correct generator codegen This removes unnecessary panicking branches in the resume function when the generator can not return or unwind, respectively. Closes https://github.com/rust-lang/rust/issues/66100 It also addresses the correctness concerns wrt poisoning on unwind. These are not currently a soundness issue because any operation *inside* a generator that could possibly unwind will result in a cleanup path for dropping it, ultimately reaching a `Resume` terminator, which we already handled correctly. Future MIR optimizations might optimize that out, though. r? @Zoxc
2020-03-17rustc_mir: remove extra space when pretty-printing MIR.Ana-Maria Mihalache-1/+1
2020-03-17Update tests for erasing regions in typeckMatthew Jasper-22/+22
2020-03-16Auto merge of #67133 - oli-obk:it_must_be_a_sign, r=eddybbors-18/+18
Deduplicate pretty printing of constants r? @eddyb for the pretty printing logic cc @RalfJung
2020-03-11Don't print all zsts as their type as it makes no sense for more complex ↵Oliver Scherer-3/+3
examples (e.g. structs)
2020-03-11Print leading zeros for non pointersOliver Scherer-1/+1
2020-03-11Don't print leading zeros on hex dumps constantsOliver Scherer-6/+6
2020-03-11Deduplicate and clean up pretty printing logicOliver Scherer-14/+14
2020-03-10Ignore `mir-opt` test when panic=abortDylan MacKenzie-0/+2
2020-03-10Add `mir-opt` test for better drop elaborationDylan MacKenzie-0/+41
2020-03-08Add test for unnecessary panic branchesJonas Schievink-0/+34
2020-02-16suspend -> yieldJonas Schievink-1/+1
2020-02-16Fix printing of `Yield` terminatorJonas Schievink-1/+1
2020-02-06Rollup merge of #68524 - jonas-schievink:generator-resume-arguments, r=ZoxcDylan DPC-30/+30
Generator Resume Arguments cc https://github.com/rust-lang/rust/issues/43122 and https://github.com/rust-lang/rust/issues/56974 Blockers: * [x] Fix miscompilation when resume argument is live across a yield point (https://github.com/rust-lang/rust/pull/68524#issuecomment-578459069) * [x] Fix 10% compile time regression in `await-call-tree` benchmarks (https://github.com/rust-lang/rust/pull/68524#issuecomment-578487162) * [x] Fix remaining 1-3% regression (https://github.com/rust-lang/rust/pull/68524#issuecomment-579566255) - resolved (https://github.com/rust-lang/rust/pull/68524#issuecomment-581144901) * [x] Make dropck rules account for resume arguments (https://github.com/rust-lang/rust/pull/68524#issuecomment-578541137) Follow-up work: * Change async/await desugaring to make use of this feature * Rewrite [`box_region.rs`](https://github.com/rust-lang/rust/blob/3d8778d767f0dde6fe2bc9459f21ead8e124d8cb/src/librustc_data_structures/box_region.rs) to use resume arguments (this shows up in profiles too)
2020-02-03Add more tests for or-patternsMatthew Jasper-0/+76
2020-02-03Fix miscompilationJonas Schievink-3/+2
2020-02-02No resume argument in the drop shimJonas Schievink-1/+0
2020-02-02Adjust mir-opt tests to new `yield` loweringJonas Schievink-29/+31
2020-02-01Update existing tests for or-patternsMatthew Jasper-190/+188
2020-01-24Render const pointers in MIR more compactlyOliver Scherer-4/+4
2020-01-20Rollup merge of #68335 - RalfJung:drop-in-place, r=Mark-SimulacrumDylan DPC-7/+7
Remove real_drop_in_place In https://github.com/rust-lang/rust/commit/af9b057156f610df3528a502c668cfed99ce8a1a, I added `real_drop_in_place` because Stacked Borrows at the time couldn't handle transmuting of mutable references to raw pointers and back. Stacked Borrows 2, however, doesn't have any issue with these transmutes, so it is time to remove this hack again.
2020-01-18slice_patterns: remove gates in testsMazdak Farrokhzad-1/+0
2020-01-18Auto merge of #68170 - wesleywiser:stop_const_prop_ref_taking, r=oli-obkbors-2/+2
Turn off const propagation of ref taking Fixes #67529 Fixes #67640 Fixes #67641 Fixes #67862 r? @oli-obk
2020-01-18adjust mir-opt testsRalf Jung-7/+7
2020-01-15Rollup merge of #68236 - JohnTitor:ice-tests, r=CentrilDylan DPC-0/+1
Add some regression tests Closes #64848 (fixed by #67631) Closes #65918 (ICE is hidden by #67000, no longer ICE) Closes #66473 (fixed by #68084) Closes #67550 (set mir-opt-level to 3) r? @Centril
2020-01-15Set mir-opt-level to 3 to prevent regressionsYuki Okushi-0/+1
2020-01-14Add unreachable propagation mir optimization passKonstantinos Triantafyllou-67/+339
2020-01-12Turn off const propagation of ref takingWesley Wiser-2/+2
Fixes #67529 Fixes #67640 Fixes #67641 Fixes #67862
2020-01-10Rebase falloutOliver Scherer-2/+4
2020-01-10Add regression tests for promotion mir expansionOliver Scherer-0/+59
2020-01-10Promote `Ref`s to constants instead of staticSantiago Pastorino-10/+15
2020-01-09Rollup merge of #67630 - oli-obk:extern_ptr_dangling, r=spastorinoMazdak Farrokhzad-0/+71
Treat extern statics just like statics in the "const pointer to static" representation fixes #67612 r? @spastorino cc @RalfJung this does not affect runtime promotion at all. This is just about promotion within static item bodies.
2020-01-04Rollup merge of #67137 - anp:tracked-panic-internals, r=eddybDylan DPC-0/+1
libstd uses `core::panic::Location` where possible. cc @eddyb
2020-01-04Test cleanups to match #[track_caller] in panic!.Adam Perry-0/+1
* Removes unnecessary feature flag from track_caller test. * Tests of panic internals no longer need to explicitly construct Location. * Add #![warn(const_err)] to retain-never-const per @oli-obk. * Add track_caller test with diverging function.
2019-12-30Lint overflowing integer casts in const propWesley Wiser-0/+49
This extends the invalid cases we catch in const prop to include overflowing integer casts using the same machinery as the overflowing binary and unary operation logic.
2019-12-27Fix `Instance::resolve()` incorrectly returning specialized instancesWesley Wiser-0/+48
We only want to return specializations when `Reveal::All` is passed, not when `Reveal::UserFacing` is. Resolving this fixes several issues with the `ConstProp`, `SimplifyBranches`, and `Inline` MIR optimization passes. Fixes #66901
2019-12-26Treat extern statics just like statics in the "const pointer to static" ↵Oliver Scherer-0/+71
representation
2019-12-21Rollup merge of #67333 - wesleywiser:fix_inline_into_box_place, r=oli-obkMazdak Farrokhzad-0/+71
[mir-opt] Fix `Inline` pass to handle inlining into `box` expressions r? @oli-obk Before, the test case just ICE'd here: https://github.com/rust-lang/rust/blob/a605441e049f0b6d5f7715b94b8ac4662fd7fcf6/src/librustc_mir/transform/inline.rs#L668
2019-12-20Move the rest of the mir-opt inline tests into a folderWesley Wiser-0/+0
2019-12-20[mir-opt] Fix `Inline` pass to handle inlining into `box` expressionsWesley Wiser-0/+71
2019-12-20Rollup merge of #67130 - wesleywiser:const_prop_into_locals, r=oli-obkMazdak Farrokhzad-4/+153
Const prop should finish propagation into user defined variables Fixes #66638 ~~Temporarily rebased on top of #67015 to get those fixes.~~ r? @oli-obk
2019-12-18Add mir opt test for AddressOfMatthew Jasper-0/+112