about summary refs log tree commit diff
path: root/src/test/mir-opt/const_prop
AgeCommit message (Collapse)AuthorLines
2021-10-06run remaining testsAlexander-4/+10
2021-09-25Bless testsGary Guo-9/+26
2021-09-02Bless 32bit MIR opt testsMatthew Jasper-6/+6
2021-09-01Fix drop handling for `if let` expressionsMatthew Jasper-8/+8
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-27Auto merge of #88371 - Manishearth:rollup-pkkjsme, r=Manishearthbors-6/+6
Rollup of 11 pull requests Successful merges: - #87832 (Fix debugger stepping behavior with `match` expressions) - #88123 (Make spans for tuple patterns in E0023 more precise) - #88215 (Reland #83738: "rustdoc: Don't load all extern crates unconditionally") - #88216 (Don't stabilize creation of TryReserveError instances) - #88270 (Handle type ascription type ops in NLL HRTB diagnostics) - #88289 (Fixes for LLVM change 0f45c16f2caa7c035e5c3edd40af9e0d51ad6ba7) - #88320 (type_implements_trait consider obligation failure on overflow) - #88332 (Add argument types tait tests) - #88340 (Add `c_size_t` and `c_ssize_t` to `std::os::raw`.) - #88346 (Revert "Add type of a let tait test impl trait straight in let") - #88348 (Add field types tait tests) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-08-26update mir diffslcnr-9/+9
2021-08-25Fix debugger stepping behavior around `match` expressionsWesley Wiser-6/+6
Previously, we would set up the source lines for `match` expressions so that the code generated to perform the test of the scrutinee was matched to the line of the arm that required the test and then jump from the arm block to the "next" block was matched to all of the lines in the `match` expression. While that makes sense, it has the side effect of causing strange stepping behavior in debuggers. I've changed the source information so that all of the generated tests are sourced to `match {scrutinee}` and the jumps are sourced to the last line of the block they are inside. This resolves the weird stepping behavior in all debuggers and resolves some instances of "ambiguous symbol" errors in WinDbg preventing the user from setting breakpoints at `match` expressions.
2021-08-19Revert "Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, ↵Erik Desjardins-2/+1
r=oli-obk"" This reverts commit 8e11199a153218c13a419df37a9bb675181cccb7.
2021-08-15Revert "Auto merge of #83417 - erikdesjardins:enableremovezsts, r=oli-obk"Erik Desjardins-1/+2
This reverts commit 8007b506ac5da629f223b755f5a5391edd5f6d01, reversing changes made to e55c13e1099b78b1a485202fabc9c1b10b1f1d15.
2021-08-07Run RemoveZsts at mir-opt-level=1Erik Desjardins-2/+1
Effectively reverts commit 6960bc9696b05b15d8d89ece2fef14e6e62a43fc.
2021-07-14bless mir-opt, codegen, and remaining ui testsRalf Jung-11/+11
2021-07-06Revert "Revert "Update mir opt tests""bjorn3-9/+9
This reverts commit 8d5fb5bf7d5c63dcfaea381e00ded67c21fab3a3.
2021-06-23Updated mir pretty print outputDeadbeef-24/+0
2021-06-07Revert "Update mir opt tests"bjorn3-9/+9
This reverts commit e0e0cfa6492292d0b905b07a4ed727f4e1aefc80.
2021-05-30Update mir opt testsbjorn3-9/+9
2021-05-17mir-opt bless for Size field being removed from AllocationRalf Jung-10/+10
2021-03-31Make unevaluated DefId rendering deterministicOli Scherer-9/+9
2021-03-23Auto merge of #83177 - erikdesjardins:zstassign, r=oli-obkbors-39/+39
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-22only run RemoveZsts at mir-opt-level 3 and aboveErik Desjardins-1/+2
2021-03-20bless mir-opt testslcnr-18/+18
2021-03-15bless testsErik Desjardins-40/+39
2021-03-13Extend SimplifyLocals to remove ZST writesSimon Vandel Sillesen-3/+0
2021-03-05Bump mir-opt-level from 2 to 3 in testsSantiago Pastorino-2/+2
2021-03-05Bump mir-opt-level from 3 to 4 in testsSantiago Pastorino-2/+2
2021-01-25Implement new panic!() behaviour for Rust 2021.Mara Bos-5/+5
2021-01-07Reintroduce hir::ExprKind::IfCaio-8/+8
2020-12-23Addressed feedbacksYenlin Chen-24/+0
Also updated the mir-opt test output files.
2020-12-03Combination of commitsRich Kadel-2/+2
Fixes multiple issue with counters, with simplification Includes a change to the implicit else span in ast_lowering, so coverage of the implicit else no longer spans the `then` block. Adds coverage for unused closures and async function bodies. Fixes: #78542 Adding unreachable regions for known MIR missing from coverage map Cleaned up PR commits, and removed link-dead-code requirement and tests Coverage no longer depends on Issue #76038 (`-C link-dead-code` is no longer needed or enforced, so MSVC can use the same tests as Linux and MacOS now) Restrict adding unreachable regions to covered files Improved the code that adds coverage for uncalled functions (with MIR but not-codegenned) to avoid generating coverage in files not already included in the files with covered functions. Resolved last known issue requiring --emit llvm-ir workaround Fixed bugs in how unreachable code spans were added.
2020-10-27Disable "optimization to avoid load of address" in InstCombineJonas Schievink-2/+2
2020-10-22Check which places are deadSimon Vandel Sillesen-2/+2
Fixes #78192
2020-10-21Disable "optimization to avoid load of address" in InstCombineTomasz Miąsko-2/+2
2020-10-04Bless mir-opt testsAaron Hill-6/+6
2020-09-26Bless mir-opt 32-bit testsvarkor-14/+14
2020-09-26Bless mir-opt testsvarkor-28/+28
2020-09-25Move from {{closure}}#0 syntax to {closure#0} for (def) path componentsmarmeladema-18/+18
2020-09-21Add optimization to avoid load of addressSimon Vandel Sillesen-2/+2
2020-09-17Rename 32 bit mir files to be more tool friendlyNixon Enraght-Moony-0/+0
See #75746
2020-09-17Rename 64 bit mir files to be more tool friendlyNixon Enraght-Moony-0/+0
See #75746
2020-09-02pretty: trim paths of unique symbolsDan Aloni-2/+2
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-08-21Suppress "const" prefix of FnDef in MIR dumpLzu Tao-14/+14
2020-08-20Auto merge of #75562 - oli-obk:const_prop_no_aggregates, r=wesleywiserbors-8/+56
Check that we don't use `Rvalue::Aggregate` after the deaggregator fixes #75481 r? @wesleywiser cc @RalfJung (modified the validator)
2020-08-20Suppress MIR comments of Unit typeLzu Tao-264/+0
2020-08-20Suppress MIR comments for FnDef in ty::ConstLzu Tao-39/+0
2020-08-18Validate the MIR of all optimizations in the mir-opt directoryOliver Scherer-8/+56
2020-08-17Update MIR tests with comment verbosity fixAustin Lasher-1550/+23
2020-08-11move Deaggregate pass to post_borrowck_cleanupRalf Jung-61/+56
2020-07-29Update tests after rebaseOliver Scherer-1/+1
2020-07-29Add test ensuring that we don't propagate large arraysOliver Scherer-0/+177
2020-07-29Stop propagating to locals that were marks as unpropagatable.Oliver Scherer-4/+2
We used to erase these values immediately after propagation, but some things slipped through and it caused us to still initialize huge locals.
2020-07-29Move mir-opt tests to toplevelXavier Denis-0/+0