-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor call & function handling in trans, enable MIR bootstrap. #32080
Conversation
(just making sure an assignment is given, feel free to delegate elsewhere) |
☔ The latest upstream changes (presumably #31606) made this pull request unmergeable. Please resolve the merge conflicts. |
Status: I can build
The only run-pass test that only fails in stage2 is @rust-lang/tools If I provide a flag to enable MIR trans for everything, and an attribute to mark functions which can't be yet properly translated via MIR, would it be possible to have buildbot ensure MIR doesn't regress? |
|
934c483
to
5024b6d
Compare
@eddyb I'd be fine at least adding a MIR bot! If it's a Do you think MIR will want platform coverage as well? A Linux/OSX/Windows builder, or just one with it enabled? |
@alexcrichton Before the next snapshot, Sadly, it doesn't look like tests inherit We'll want at least a non-MSVC and a MSVC builder, because of the differences in how unwinding works there. |
Ok, sounds like a linux + MSVC builder, and can you add this as a |
@alexcrichton Does that last commit look good? |
Looks good to me! |
Down to 9 run-pass MIR failures:
I'll just start tagging them with |
76a4fa2
to
0c413a8
Compare
📌 Commit e177207 has been approved by |
⌛ Testing commit e177207 with merge 3c572b6... |
💔 Test failed - auto-win-gnu-64-opt |
@bors r=nikomatsakis force |
📌 Commit b12dcde has been approved by |
Refactor call & function handling in trans, enable MIR bootstrap. Non-Rust and Rust ABIs were combined into a common codepath, which means: * The ugly `__rust_abi` "clown shoes" shim for C->Rust FFI is gone, fixes #10116. * Methods, *including virtual ones* support non-Rust ABIs, closes #30235. * Non-Rust ABIs also pass fat pointers in two arguments; the result should be identical. * Zero-sized types are never passed as arguments; again, behavior shouldn't change. Additionally, MIR support for calling intrinsics (through old trans) was implemented. Alongside assorted fixes, it enabled MIR to launch 🚀 and do a *complete* bootstrap. To try it yourself, `./configure --enable-orbit` *or* `make RUSTFLAGS="-Z orbit"`.
Pretty impressive that translation still ends up being faster! |
Update snapshots to 2016-03-18 (235d774). The new snapshots notably include @nikomatsakis' #32164 fix for the regionck error spew. Also, `./configure --enable-orbit` *and/or* `make RUSTFLAGS="-Z orbit"` should work now (#32080).
rBreak Critical Edges and other MIR work This PR is built on top of #32080. This adds the basic depth-first traversals for MIR, preorder, postorder and reverse postorder. The MIR blocks are now translated using reverse postorder. There is also a transform for breaking critical edges, which includes the edges from `invoke`d calls (`Drop` and `Call`), to account for the fact that we can't add code after an `invoke`. It also stops generating the intermediate block (since the transform essentially does it if necessary already). The kinds of cases this deals with are difficult to produce, so the test is the one I managed to get. However, it seems to bootstrap with `-Z orbit`, which it didn't before my changes.
Non-Rust and Rust ABIs were combined into a common codepath, which means:
__rust_abi
"clown shoes" shim for C->Rust FFI is gone, fixes remove the need for foreign ABI wrappers #10116.Additionally, MIR support for calling intrinsics (through old trans) was implemented.
Alongside assorted fixes, it enabled MIR to launch 🚀 and do a complete bootstrap.
To try it yourself,
./configure --enable-orbit
ormake RUSTFLAGS="-Z orbit"
.