summary refs log tree commit diff
path: root/src/test/mir-opt/inline
AgeCommit message (Collapse)AuthorLines
2020-09-30Auto merge of #77069 - sexxi-goose:closure_print_2, r=nikomatsakisbors-2/+2
pretty.rs: Update Closure and Generator print More detailed outline: https://github.com/rust-lang/project-rfc-2229/pull/17 Closes: https://github.com/rust-lang/project-rfc-2229/issues/11 r? `@nikomatsakis` cc `@eddyb` `@davidtwco` `@estebank`
2020-09-28pretty.rs: Update Closure and Generator printAman Arora-2/+2
Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com> Co-authored-by: Logan Mosier <logmosier@gmail.com>
2020-09-27Remove unnecessary -Zunsound-mir-opts uses in testsWesley Wiser-13/+25
2020-09-27[mir-opt] Introduce a new flag to enable experimental/unsound mir optsWesley Wiser-3/+3
2020-09-25Move from {{closure}}#0 syntax to {closure#0} for (def) path componentsmarmeladema-10/+10
2020-09-21Add optimization to avoid load of addressSimon Vandel Sillesen-8/+12
2020-09-18Bless mir-opt testsJonas Schievink-14/+10
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-14Auto merge of #76123 - tmiasko:inline-args-storage, r=wesleywiserbors-0/+14
inliner: Emit storage markers for introduced arg temporaries When introducing argument temporaries during inlining, emit storage marker statements just before the assignment and in the beginning of the return block. This ensures that such temporaries will not be considered live across yield points after inlining inside a generator. Fixes #71793.
2020-09-04inliner: Add mir-opt tests for codegen attributes compatibilityTomasz Miąsko-0/+133
2020-09-03Auto merge of #73996 - da-x:short-unique-paths, r=petrochenkovbors-9/+9
diagnostics: shorten paths of unique symbols This is a step towards implementing a fix for #50310, and continuation of the discussion in [Pre-RFC: Nicer Types In Diagnostics - compiler - Rust Internals](https://internals.rust-lang.org/t/pre-rfc-nicer-types-in-diagnostics/11139). Impressed upon me from previous discussion in #21934 that an RFC for this is not needed, and I should just come up with code. The recent improvements to `use` suggestions that I've contributed have given rise to this implementation. Contrary to previous suggestions, it's rather simple logic, and I believe it only reduces the amount of cognitive load that a developer would need when reading type errors. ----- If a symbol name can only be imported from one place, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path to the last component. 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 from anywhere.
2020-09-03inliner: Emit storage markers for introduced arg temporariesTomasz Miąsko-0/+14
When introducing argument temporaries during inlining, emit storage marker statements just before the assignment and in the beginning of the return block. This ensures that such temporaries will not be considered live across yield points after inlining inside a generator.
2020-09-02pretty: trim paths of unique symbolsDan Aloni-9/+9
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-09-02inliner: Avoid query cycles when optimizing generatorsTomasz Miąsko-0/+18
The HIR Id trick is insufficient to prevent query cycles when optimizing generators, since merely requesting a layout of a generator also computes its `optimized_mir`. Make no attempts to inline functions into generators within the same crate to avoid query cycles.
2020-08-21Suppress "const" prefix of FnDef in MIR dumpLzu Tao-9/+9
2020-08-20Suppress MIR comments of Unit typeLzu Tao-56/+34
2020-08-20Suppress MIR comments for FnDef in ty::ConstLzu Tao-27/+2
2020-08-17Update MIR tests with comment verbosity fixAustin Lasher-31/+3
2020-08-11move Deaggregate pass to post_borrowck_cleanupRalf Jung-30/+7
2020-07-31compiletest: ignore-endian-big, fixes #74829, fixes #74885Ximin Luo-1/+1
2020-07-29Move mir-opt tests to toplevelXavier Denis-0/+0
2020-07-29add crate name to mir dumpsXavier Denis-13/+13
2020-07-27mv std libs to library/mark-25/+25
2020-07-15improve namingBastian Kauschke-4/+4
2020-07-15mir opt diffBastian Kauschke-4/+4
2020-06-26Show the values and computation that would overflow a const evaluation or ↵Oliver Scherer-7/+7
propagation
2020-06-04Revert "Bless mir-opt tests"Felix S. Klock II-28/+34
This reverts commit a030c923412b0a0f7b02a585debe7bf60357370d.
2020-05-31InstCombine: Don't optimize `&mut *x` into `x`Jonas Schievink-3/+11
2020-05-25Avoid `Operand::Copy` with `&mut T`Jonas Schievink-2/+2
2020-05-24Clear MIR local type annotations after borrowckJonas Schievink-2/+2
2020-05-16Bless MIR tests that inline functions qualifying for NRVODylan MacKenzie-15/+3
2020-05-09Bless mir-opt testsMatthew Jasper-34/+28
2020-05-07Renamed "undef" stuff to "uninit"Hanif Bin Ariffin-4/+4
1. InvalidUndefBytes -> InvalidUninitBytes 2. ScalarMaybeUndef -> ScalarMaybeUninit 3. UndefMask -> InitMask Related issue #71193
2020-04-27Emit basic block ids for statements and terminators in MIR only in -Zverbose ↵Oliver Scherer-232/+223
mode
2020-04-26check that `AsRef` and `AsMut` are inlinedBastian Kauschke-0/+139
2020-04-17ty/print: pretty-print constant aggregates (arrays, tuples and ADTs).Eduard-Mihai Burtescu-2/+2
2020-04-14update 32 bit mir-opt testsBastian Kauschke-15/+24
2020-04-13bless mir opt testsBastian Kauschke-19/+34
2020-04-11tests: don't use only-64bit in mir-opt tests.Eduard-Mihai Burtescu-1/+77
2020-04-07--bless more mir-opt tests.Ana-Maria Mihalache-280/+474
2020-03-25run test only on 64bitBastian Kauschke-0/+1
2020-03-24update mir opt testBastian Kauschke-1/+1
2020-01-15Set mir-opt-level to 3 to prevent regressionsYuki Okushi-0/+1
2020-01-10Promote `Ref`s to constants instead of staticSantiago Pastorino-5/+5
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-20Move the rest of the mir-opt inline tests into a folderWesley Wiser-0/+302
2019-12-20[mir-opt] Fix `Inline` pass to handle inlining into `box` expressionsWesley Wiser-0/+71