1 This folder contains tests for MIR optimizations.
8 // START $file_name_of_some_mir_dump_0
12 // END $file_name_of_some_mir_dump_0
14 // START $file_name_of_some_mir_dump_N
18 // END $file_name_of_some_mir_dump_N
21 All the test information is in comments so the test is runnable.
23 For each $file_name, compiletest expects [$expected_line_0, ...,
24 $expected_line_N] to appear in the dumped MIR in order. Currently it allows
25 other non-matched lines before, after and in-between.
27 Lines match ignoring whitespace, and the prefix "//" is removed.
29 It also currently strips trailing comments -- partly because the full file path
30 in "scope comments" is unpredictable and partly because tidy complains about
31 the lines being too long.
33 compiletest handles dumping the MIR before and after every pass for you. The
34 test writer only has to specify the file names of the dumped files (not the
35 full path to the file) and what lines to expect. I added an option to rustc
36 that tells it to dump the mir into some directly (rather then always dumping to
37 the current directory).
39 Lines match ignoring whitespace, and the prefix "//" is removed of course.
41 It also currently strips trailing comments -- partly because the full file path
42 in "scope comments" is unpredictable and partly because tidy complains about
43 the lines being too long.