Skip to content

OnceReduction: Optimize bodies of trivial "once" functions - #6061

Merged
kripken merged 33 commits into
mainfrom
twice.moar
Oct 31, 2023
Merged

OnceReduction: Optimize bodies of trivial "once" functions#6061
kripken merged 33 commits into
mainfrom
twice.moar

Conversation

@kripken

Copy link
Copy Markdown
Member

In particular, if the body just calls another "once" function, then we can
skip the early-exit logic (see details in the comment in the new code).

Followup/replacement of #6055

cc @gkdn

@gkdn

gkdn commented Oct 31, 2023

Copy link
Copy Markdown
Contributor

Logic LGTM, validating on my branch.

@gkdn

gkdn commented Oct 31, 2023

Copy link
Copy Markdown
Contributor

Logic LGTM, validating on my branch.

👍

@kripken

Copy link
Copy Markdown
MemberAuthor

Great, thanks for confirming @gkdn

Meanwhile this has been fuzzed to almost 1M iterations, so I'm fairly confident in it (though this pattern is quite hard to fuzz).

@kripken
kripken merged commit fad0698 into mainOct 31, 2023
@kripken
kripken deleted the twice.moar branch October 31, 2023 15:30
kripken added a commit that referenced this pull request Oct 31, 2023
kripken added a commit that referenced this pull request Oct 31, 2023
kripken added a commit that referenced this pull request Oct 31, 2023
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
…ly#6061)
In particular, if the body just calls another "once" function, then we can
skip the early-exit logic.
radekdoulik pushed a commit to dotnet/binaryen that referenced this pull request Jul 12, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@kripken@gkdn@tlively