Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd MIR Optimization Tests #34715
Conversation
rust-highfive
assigned
aturon
Jul 7, 2016
This comment has been minimized.
This comment has been minimized.
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
rust-highfive
assigned
nikomatsakis
and unassigned
aturon
Jul 7, 2016
rkruppe
reviewed
Jul 8, 2016
| let file_name = format!("rustc.node{}{}.{}.{}.mir", | ||
| node_id, promotion_id, pass_name, disambiguator); | ||
| let _ = fs::File::create(&file_name).and_then(|mut file| { | ||
| file_path.push_str("/"); |
This comment has been minimized.
This comment has been minimized.
rkruppe
Jul 8, 2016
Member
Doesn't this mean that, if no path is specified, the MIR will be dumped into the root folter (/rustc.node[...].mir)? Using PathBuf can avoid that, and would be semantically more appropriate and more robust anyway.
This comment has been minimized.
This comment has been minimized.
|
Makefile changes look good to me! Could you also be sure to update |
scottcarr
force-pushed the
scottcarr:mir-test
branch
from
52ccb6f
to
482ec55
Jul 12, 2016
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton is there a bot that runs rustbuild? I think the travis bot builds with make, right? I'm pretty sure I tested this with both build systems, but we could double check. |
This comment has been minimized.
This comment has been minimized.
|
@scottcarr all correct! I'm fine letting bors figure out the rest |
nikomatsakis
reviewed
Jul 18, 2016
|
|
||
| let mir_dump_dir = self.get_mir_dump_dir(); | ||
| if !mir_dump_dir.exists() { | ||
| fs::create_dir(mir_dump_dir.clone()).expect("the dir should exist"); |
This comment has been minimized.
This comment has been minimized.
nikomatsakis
Jul 18, 2016
Contributor
I think this should be the "racy" create-dir option, probably-- though I guess each test will be making disjoint directories, so maybe it's not needed.
This comment has been minimized.
This comment has been minimized.
|
Can you maybe add the |
This comment has been minimized.
This comment has been minimized.
|
But basically r+ from me |
scottcarr
force-pushed the
scottcarr:mir-test
branch
from
4de1bae
to
d23e5cd
Jul 20, 2016
scottcarr
changed the title
[WIP] Add MIR Optimization Tests
Add MIR Optimization Tests
Jul 20, 2016
scottcarr
force-pushed the
scottcarr:mir-test
branch
5 times, most recently
from
36d589d
to
1669574
Jul 20, 2016
scottcarr
force-pushed the
scottcarr:mir-test
branch
from
1669574
to
8f9844d
Jul 21, 2016
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added a commit
that referenced
this pull request
Jul 21, 2016
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors: retry On Thu, Jul 21, 2016 at 11:01 AM, bors notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jul 21, 2016
This comment has been minimized.
This comment has been minimized.
|
|
This comment has been minimized.
This comment has been minimized.
|
@bors: retry On Thu, Jul 21, 2016 at 11:56 AM, bors notifications@github.com wrote:
|
scottcarr commentedJul 7, 2016
I've starting working on the infrastructure for testing MIR optimizations.
The plan now is to have a set of test cases (written in Rust), compile them with -Z dump-mir, and check the MIR before and after each pass.