Skip to content
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

WASM - Inlining (2w) #2794

Closed
Cellule opened this issue Apr 6, 2017 · 0 comments
Closed

WASM - Inlining (2w) #2794

Cellule opened this issue Apr 6, 2017 · 0 comments

Comments

@Cellule
Copy link
Contributor

Cellule commented Apr 6, 2017

Add support for inlining in WebAssembly

@Cellule Cellule created this issue from a note in WebAssembly (Work Items) Apr 6, 2017
@dilijev dilijev modified the milestone: WebAssembly-Next Apr 25, 2017
@Cellule Cellule moved this from Work Items to In Progress in WebAssembly May 3, 2017
@Cellule Cellule moved this from In Progress to Work Items in WebAssembly May 19, 2017
@Cellule Cellule moved this from Work Items P3 to Work Items P1 in WebAssembly Aug 3, 2017
chakrabot pushed a commit that referenced this issue Sep 14, 2017
Merge pull request #3681 from MikeHolman:wasminline

Add support for profiling in asm.js, and profile direct internal calls.

Use temp registers rather than hard coded registers for intermediate bytecode values, so backend correctly understands that these are temps and not locals. (Also allowed me to remove the I_Conv_* opcodes.)

Tell inliner to try to inline candidate asm.js/wasm functions. Required some special handling for functions with no parameters and non-var arguments, and skipping function object bailout check.

Simplify how we emit calls in asm.js bytecode generator to evaluate arguments before emitting argouts. Prior code required complicated tracking of call depth during bytecode gen, which led to complicated call nesting (and subsequently made inlining more complicated).

Track calls for asm.js/wasm during globopt, and change inline argument tracking to use inlinee argout size rather than count for frame size calculation. (This will be needed for stackwalking, which we punted for asm.js in general... but is something we should really get around to.)

For inlining heuristics, we are more aggressive at inlining than normal JS, for the reason that bytecode is already low level, so it will blow up in size less than JS bytecode will.

Preliminary perf indicates overall improvements of about 4.5% in Unity and 1% in Jetstream

Closes #2794

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/microsoft/chakracore/3681)
<!-- Reviewable:end -->
@Cellule Cellule moved this from Work Items P1 to Completed in WebAssembly Sep 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
WebAssembly
Completed
Development

No branches or pull requests

3 participants