-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Don't force inliner in case of ref type function args #4823
Conversation
This was required previously, but after the IR refactoring (#4336), this is no longer required, and actually worsens things. Fixes #4747. For the two tests mentioned there, (both based on https://github.com/hashcloak/fuel-crypto/) the compile time now comes down from 30m -> 16s and 180m -> 31s.
Locals alloc must happen before other initializations (such as saving the frame pointer for args). Otherwise, if those other registers are spilled, then LocalsBase reg will end up being initialized *after* the spill. That can't happen because spill offsets are based on LocalsBase reg.
Here are some stats from our testsuite. There is code increase in some small tests, where due to not inlining, the overheads of a function call result in overall increase. There are a few exceptions to this that need to be investigated though. But irrespective of the stats, this change is necessary, because the inliner heuristic I'm removing here is not based on any inliner "logic" but as a workaround against some other bug that has since been fixed. Stats
|
The two tests here don't compile successfully on
|
This reverts the inliner change that was done in #4823. Without this, when sharing stack data across contract boundaries, we end up with an illegal access. --------- Co-authored-by: IGI-111 <igi-111@protonmail.com>
This was required previously, but after the IR refactoring (#4336), this is no longer required, and actually worsens things.
Fixes #4747. For the two tests mentioned there, (both based on https://github.com/hashcloak/fuel-crypto/) the compile time now comes down from
Also fixes two bugs uncovered: