about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/match_branches.rs
AgeCommit message (Collapse)AuthorLines
2021-09-07Move rustc_mir::transform to rustc_mir_transform.Camille GILLOT-176/+0
2021-08-18Remove box syntax from rustc_mirest31-3/+6
2021-06-01Reland - Report coverage `0` of dead blocksRich Kadel-1/+1
Fixes: #84018 With `-Z instrument-coverage`, coverage reporting of dead blocks (for example, blocks dropped because a conditional branch is dropped, based on const evaluation) is now supported. Note, this PR relands an earlier, reverted PR that failed when compiling generators. The prior issues with generators has been resolved and a new test was added to prevent future regressions. Check out the resulting changes to test coverage of dead blocks in the test coverage reports in this PR.
2021-05-11Revert "Auto merge of #84797 - richkadel:cover-unreachable-statements, ↵Rich Kadel-1/+1
r=tmandry" This reverts commit e5f83d24aee866a14753a7cedbb4e301dfe5bef5, reversing changes made to ac888e8675182c703c2cd097957878faf88dad94.
2021-05-01Report coverage `0` of dead blocksRich Kadel-1/+1
Fixes: #84018 With `-Z instrument-coverage`, coverage reporting of dead blocks (for example, blocks dropped because a conditional branch is dropped, based on const evaluation) is now supported. If `instrument-coverage` is enabled, `simplify::remove_dead_blocks()` finds all dropped coverage `Statement`s and adds their `code_region`s as `Unreachable` coverage `Statement`s to the `START_BLOCK`, so they are still included in the coverage map. Check out the resulting changes in the test coverage reports in this PR.
2021-03-26Use iter::zip in compiler/Josh Stone-2/+3
2021-03-12Prepare mir::Constant for ty::Const only supporting valtreesOli Scherer-2/+2
2021-03-08Auto merge of #82727 - oli-obk:shrinkmem, r=pnkfelixbors-2/+1
Test the effect of shrinking the size of Rvalue by 16 bytes r? `@ghost`
2021-03-05Bump all mir_opt_level 2 to 3Santiago Pastorino-1/+1
2021-03-05For better consistency change mir_opt_level <= 1 to < 2Santiago Pastorino-1/+1
2021-03-05Extract mir_opt_level to a method and use Option to be able to know if the ↵Santiago Pastorino-1/+1
value is provided or not
2021-03-05Shrink the size of Rvalue by 16 bytesOli Scherer-2/+1
2021-02-21New pass to deduplicate blocksSimon Vandel Sillesen-1/+1
2021-02-21Make MatchBranchSimplification clean up after itselfSimon Vandel Sillesen-1/+10
2020-11-16add optimization fuel checks to some mir passescjkenn-0/+5
2020-11-04fix a couple of clippy warnings:Matthias Krüger-1/+1
filter_next manual_strip redundant_static_lifetimes single_char_pattern unnecessary_cast unused_unit op_ref redundant_closure useless_conversion
2020-10-21Introduce a temporary for discriminant value in MatchBranchSimplificationTomasz Miąsko-8/+22
The optimization introduces additional uses of the discriminant operand, but does not ensure that it is still valid to evaluate it or that it still evaluates to the same value. Evaluate it once at original position, and store the result in a new temporary.
2020-10-20Disable MatchBranchSimplificationTomasz Miąsko-0/+7
This optimization can result in unsoundness, because it introduces additional uses of a place holding the discriminant value without ensuring that it is valid to do so.
2020-10-10Refactor how SwitchInt stores jump targetsJonas Schievink-3/+6
2020-10-04Remember the `MirSource` for each `Body`Dylan MacKenzie-3/+3
2020-08-30mv compiler to compiler/mark-0/+135