-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Duplicate main and __original_main #12787
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
Comments
We do have special handling for that case in binaryen. There is a pass called Maybe this stopping being run at some point... we should investigate. However, I somewhat surprised that this pass is even needed? Should binaryen "If a function has just a single caller, and the function is not exported, inline the function into its caller.. no matter how big the function is?" Is there any situation where that is not desirable? Or we could be more specific and add "if the calling function is trivial.. i.e. its a wrapper" |
Ah, yes it looks like this was removed in #11995. I guess the normal inlining passes at |
From my brief experiments it looks like this is getting correctly inlined at This seems wrong. |
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant. |
It looks like if one builds with a main that is of form
int main(){...}
, there will be this kind of stubthat will be generated, but not inlined away even in -O3. Is that something that would be possible to optimize away?
The text was updated successfully, but these errors were encountered: