Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Issue 2330883002: [turbofan] Call frequencies for JSCallFunction and JSCallConstruct. (Closed)

Created:
4 years, 3 months ago by Benedikt Meurer
Modified:
4 years, 3 months ago
Reviewers:
Jarin, rmcilroy
CC:
v8-reviews_googlegroups.com, rmcilroy
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Call frequencies for JSCallFunction and JSCallConstruct. Extract the call counts from the type feedback vector during graph building (either via the AstGraphBuilder or the BytecodeGraphBuilder), and put them onto the JSCallFunction and JSCallConstruct operators, so that they work even across inlinine through .apply and .call (which was previously hacked by creating a temporary type feedback vector for those). The next logic step will be to make those call counts into real relative call frequencies (also during graph building), so that we can make inlining decisions that make sense for the function being optimized (where absolute values are misleading). R=jarin@chromium.org BUG=v8:5267, v8:5372 Committed: https://crrev.com/0b8a69458ea25314f83d83fbe7f6ced4f903daf1 Cr-Commit-Position: refs/heads/master@{#39400}

Patch Set 1 #

Patch Set 2 : Also handle invalid slots properly in the AstGraphBuilder. #

Patch Set 3 : REBASE #

Total comments: 6

Patch Set 4 : REBASE and feedback. #

Patch Set 5 : Rebase onto the correct CL. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+98 lines, -86 lines) Patch
M src/compiler/ast-graph-builder.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/ast-graph-builder.cc View 1 2 3 4 chunks +14 lines, -4 lines 0 comments Download
M src/compiler/bytecode-graph-builder.h View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 3 3 chunks +17 lines, -7 lines 0 comments Download
M src/compiler/js-call-reducer.cc View 1 2 3 4 4 chunks +3 lines, -27 lines 0 comments Download
M src/compiler/js-inlining-heuristic.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/compiler/js-inlining-heuristic.cc View 1 2 3 4 2 chunks +12 lines, -16 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M src/compiler/js-native-context-specialization.cc View 1 2 3 2 chunks +7 lines, -5 lines 0 comments Download
M src/compiler/js-operator.h View 5 chunks +20 lines, -10 lines 0 comments Download
M src/compiler/js-operator.cc View 5 chunks +10 lines, -9 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 35 (27 generated)
Benedikt Meurer
4 years, 3 months ago (2016-09-12 05:14:08 UTC) #1
Benedikt Meurer
Hey Jaro, Here's the first step towards useful frequencies for inlining. It is neutral because ...
4 years, 3 months ago (2016-09-12 05:15:40 UTC) #4
rmcilroy
https://codereview.chromium.org/2330883002/diff/40001/src/compiler/bytecode-graph-builder.cc File src/compiler/bytecode-graph-builder.cc (right): https://codereview.chromium.org/2330883002/diff/40001/src/compiler/bytecode-graph-builder.cc#newcode1365 src/compiler/bytecode-graph-builder.cc:1365: if (int const slot_index = bytecode_iterator().GetIndexOperand(3)) { Drive-by-nit. Not ...
4 years, 3 months ago (2016-09-12 09:05:41 UTC) #16
Jarin
lgtm. https://codereview.chromium.org/2330883002/diff/40001/src/compiler/ast-graph-builder.h File src/compiler/ast-graph-builder.h (right): https://codereview.chromium.org/2330883002/diff/40001/src/compiler/ast-graph-builder.h#newcode268 src/compiler/ast-graph-builder.h:268: float ComputeCallFrequency(FeedbackVectorSlot slot) const; Why not double? https://codereview.chromium.org/2330883002/diff/40001/src/compiler/js-inlining-heuristic.cc ...
4 years, 3 months ago (2016-09-12 13:10:01 UTC) #17
Benedikt Meurer
https://codereview.chromium.org/2330883002/diff/40001/src/compiler/ast-graph-builder.h File src/compiler/ast-graph-builder.h (right): https://codereview.chromium.org/2330883002/diff/40001/src/compiler/ast-graph-builder.h#newcode268 src/compiler/ast-graph-builder.h:268: float ComputeCallFrequency(FeedbackVectorSlot slot) const; Because space. float fits perfectly ...
4 years, 3 months ago (2016-09-13 17:45:07 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2330883002/80001
4 years, 3 months ago (2016-09-14 04:09:58 UTC) #32
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-14 04:12:30 UTC) #33
commit-bot: I haz the power
4 years, 3 months ago (2016-09-14 04:13:15 UTC) #35
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/0b8a69458ea25314f83d83fbe7f6ced4f903daf1
Cr-Commit-Position: refs/heads/master@{#39400}

Powered by Google App Engine
This is Rietveld 408576698