-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[MIR-trans] Small fixes for the initial trans support #29583
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Function arguments that are small aggregates get passed as integer types instead. To correctly handle that, we need to use store_ty instead of plain Store.
8b8d4d9
to
fe3a609
Compare
@@ -94,6 +94,24 @@ impl<'bcx, 'tcx> MirContext<'bcx, 'tcx> { | |||
|
|||
match *operand { | |||
mir::Operand::Consume(ref lvalue) => { | |||
// watch out for temporaries that do not have an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this "trans operand into" path is all that useful. It seems like we could generate the same code by just calling trans_operand
and then store the resulting operand instead, so as not to duplicate this logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right! I wanted to preserve the memcpy for lvalue-to-lvalue copies, but for immediate values, the load/store combo is even actually better I suppose.
bebccc4
to
5a35f49
Compare
@bors r+ nice |
📌 Commit 5a35f49 has been approved by |
⌛ Testing commit 5a35f49 with merge 646afb2... |
💔 Test failed - auto-mac-64-opt |
@bors: retry On Wed, Nov 4, 2015 at 5:07 PM, bors [email protected] wrote:
|
⚡ Previous build results for auto-linux-cross-opt, auto-linux-musl-64-opt, auto-mac-64-nopt-t, auto-win-msvc-32-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-debug-opt, auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-64-opt... |
💔 Test failed - auto-mac-64-opt |
@bors: retry On Wed, Nov 4, 2015 at 8:24 PM, bors [email protected] wrote:
|
⚡ Previous build results for auto-linux-64-nopt-t, auto-linux-64-opt, auto-linux-cross-opt, auto-linux-musl-64-opt, auto-mac-64-nopt-t, auto-win-msvc-32-opt are reusable. Rebuilding only auto-linux-32-nopt-t, auto-linux-32-opt, auto-linux-64-debug-opt, auto-linux-64-x-android-t, auto-mac-32-opt, auto-mac-64-opt, auto-win-gnu-32-nopt-t, auto-win-gnu-32-opt, auto-win-gnu-64-nopt-t, auto-win-gnu-64-opt, auto-win-msvc-64-opt... |
💔 Test failed - auto-win-gnu-64-nopt-t |
@bors: retry On Wed, Nov 4, 2015 at 11:33 PM, bors [email protected] wrote:
|
The store for the "extra" data went to the wrong destination.
Added one more commit to fix handling of fat pointer function arguments. |
@bors r+ |
📌 Commit 3235b22 has been approved by |
Fix handling of small aggregate function arguments and assignments of temporaries to lvalues.
Fix handling of small aggregate function arguments and assignments of temporaries to lvalues.