-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Only unpack tupled args in inliner if we expect args to be unpacked #110833
Conversation
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt |
r? @cjgillot |
00531e6
to
e802756
Compare
Oh hey, also turns out that this allows us to inline Maybe worth running perf idk @bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
⌛ Trying commit e8027562f19ae973eabc1a217c51ee965fcd9fce with merge 28bd1d3010201044fa44005fae674a82a8868cbf... |
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (28bd1d3010201044fa44005fae674a82a8868cbf): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
lol, lmao |
Well this just seems to be a consequence of fixing the MIR inliner to actually work on Not exactly sure how to proceed, other than to make the inliner just ignore non-closure |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
@@ -0,0 +1,6 @@ | |||
// compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib |
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.
// compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib | |
// unit-test: Inline | |
// compile-flags: --crate-type=lib |
@@ -0,0 +1,10 @@ | |||
// compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib |
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.
// compile-flags: -Zmir-enable-passes=+Inline --crate-type=lib | |
// unit-test: Inline | |
// compile-flags: --crate-type=lib |
}; | ||
arg_tuple_tys.as_slice() | ||
} else { | ||
std::slice::from_ref(&arg_tuple_ty) | ||
}; |
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.
TBH, this whole branch about the RustCall ABI looks wrong. Should it mirror make_call_args
, and return Err
instead of bug!
in error cases?
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 mean: the previous implementation already looked fishy 😄
Any idea what extra functions are getting inlined? |
Sorry for the late response --
Not exactly sure, but I'm guessing it's the calls to |
wtf, |
whoops, forgot to r= this @bors r=cjgillot |
📌 Commit 21fbedfbc51941c31a963269ed28458a04524fc4 has been approved by It is now in the queue for this repository. |
⌛ Testing commit 21fbedfbc51941c31a963269ed28458a04524fc4 with merge 499232bee22d8d4be92c641b9f352625edb3a607... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
really looking forwarding to seeing this PR merged :) |
21fbedf
to
e43649f
Compare
Had to use @bors r=cjgillot |
☀️ Test successful - checks-actions |
Finished benchmarking commit (60fa393): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 648.71s -> 649.049s (0.05%) |
"rust-call"
is a strange function abi. sometimes, it expects the arguments to be unpacked by the caller and passed as individual args (closure bodies), and sometimes it does not (user functions annotated with the"rust-call"
abi).make sure the mir inliner respects this difference when checking that arguments are compatible, and doesn't try to ICE when we call a
extern "rust-call"
function in a generic context.fixes #110829