fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
61 folders60 files

files

address-of/
array-index-is-temporary/
basic_assignment/
box_expr/
byte_slice/
combine_array_len/
const-promotion-extern-static/
const_allocation/
const_allocation2/
const_allocation3/
const_prop/
copy_propagation/
copy_propagation_arg/
deaggregator_test/
deaggregator_test_enum/
deaggregator_test_enum_2/
deaggregator_test_multiple/
exponential-or/
generator-drop-cleanup/
generator-storage-dead-unwind/
generator-tiny/
graphviz/
inline/
issue-38669/
issue-41110/
issue-41697/
issue-41888/
issue-49232/
issue-62289/
loop_test/
match-arm-scopes/
match_false_edges/
match_test/
nll/
no-drop-for-inactive-variant/
no-spurious-drop-after-call/
packed-struct-drop-aligned/
remove_fake_borrows/
retag/
retain-never-const/
simple-match/
simplify-arm-identity/
simplify-locals-fixedpoint/
simplify-locals-removes-unused-consts/
simplify-locals-removes-unused-discriminant-reads/
simplify_cfg/
simplify_if/
simplify_match/
simplify_try/
slice-drop-shim/
storage_live_dead_in_statics/
storage_ranges/
uniform_array_move_out/
uninhabited-enum/
uninhabited_enum_branching/
unreachable/
unreachable_asm/
unreachable_asm_2/
unreachable_diverging/
unusual-item-types/
while-storage/
README.md1.1 KiB
address-of.rs1.1 KiB
array-index-is-temporary.rs445 B
basic_assignment.rs681 B
box_expr.rs317 B
byte_slice.rs158 B
combine_array_len.rs215 B
const-promotion-extern-static.rs360 B
const_allocation.rs221 B
const_allocation2.rs256 B
const_allocation3.rs428 B
copy_propagation.rs179 B
copy_propagation_arg.rs895 B
deaggregator_test.rs243 B
deaggregator_test_enum.rs280 B
deaggregator_test_enum_2.rs338 B
deaggregator_test_multiple.rs276 B
exponential-or.rs365 B
generator-drop-cleanup.rs353 B
generator-storage-dead-unwind.rs585 B
generator-tiny.rs461 B
graphviz.rs114 B
issue-38669.rs268 B
issue-41110.rs575 B
issue-41697.rs1.1 KiB
issue-41888.rs498 B
issue-49232.rs323 B
issue-62289.rs308 B
loop_test.rs489 B
match-arm-scopes.rs1.2 KiB
match_false_edges.rs913 B
match_test.rs435 B
no-drop-for-inactive-variant.rs383 B
no-spurious-drop-after-call.rs327 B
packed-struct-drop-aligned.rs379 B
remove_fake_borrows.rs361 B
retag.rs1.4 KiB
retain-never-const.rs494 B
return_an_array.rs151 B
simple-match.rs261 B
simplify-arm-identity.rs423 B
simplify-locals-fixedpoint.rs238 B
simplify-locals-removes-unused-consts.rs264 B
simplify-locals-removes-unused-discriminant-reads.rs193 B
simplify_cfg.rs286 B
simplify_if.rs144 B
simplify_match.rs190 B
simplify_try.rs308 B
slice-drop-shim.rs241 B
storage_live_dead_in_statics.rs808 B
storage_ranges.rs116 B
uniform_array_move_out.rs355 B
uninhabited-enum.rs476 B
uninhabited_enum_branching.rs619 B
unreachable.rs290 B
unreachable_asm.rs438 B
unreachable_asm_2.rs545 B
unreachable_diverging.rs293 B
unusual-item-types.rs657 B
while-storage.rs343 B

This folder contains tests for MIR optimizations.

The mir-opt test format emits MIR to extra files that you can automatically update by specifying --bless on the command line (just like ui tests updating .stderr files).

--blessable test format

By default 32 bit and 64 bit targets use the same dump files, which can be problematic in the presence of pointers in constants or other bit width dependent things. In that case you can add

// EMIT_MIR_FOR_EACH_BIT_WIDTH

to your test, causing separate files to be generated for 32bit and 64bit systems.

Emit a diff of the mir for a specific optimization

This is what you want most often when you want to see how an optimization changes the MIR.

// EMIT_MIR $file_name_of_some_mir_dump.diff

Emit mir after a specific optimization

Use this if you are just interested in the final state after an optimization.

// EMIT_MIR $file_name_of_some_mir_dump.after.mir

Emit mir before a specific optimization

This exists mainly for completeness and is rarely useful.

// EMIT_MIR $file_name_of_some_mir_dump.before.mir