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

Issue 2617123002: [turbofan] Allow indexed access to node inputs/input_edges (Closed)

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

Description

[turbofan] Allow indexed access to node inputs/input_edges Node::InputCount() and ::InputAt() have to check for inline/out-of-line inputs every time they are called. The compiler doesn't seem to be very good at caching the result of this check, meaning that it (and all its jumps) would happen for every node access. Previously we would get around this sometimes, by using Node::inputs(), which returned a Node::Inputs iterable over node inputs. However, sometimes node access is more convenient using an index, or we also want to access the count. This patch adds an index accessor and 'count' method to Node::Inputs, and replaces several uses of InputCount and InputAt with this accessor. Review-Url: https://codereview.chromium.org/2617123002 Cr-Commit-Position: refs/heads/master@{#42179} Committed: https://chromium.googlesource.com/v8/v8/+/6873f14b60bd2747c0a3a4650fc17a3186c1e217

Patch Set 1 #

Patch Set 2 : [turbofan] Allow indexed access to node inputs/inputedges #

Total comments: 7

Patch Set 3 : Revert AST graph builder change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -126 lines) Patch
M src/compiler/branch-elimination.cc View 1 chunk +11 lines, -4 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M src/compiler/common-operator-reducer.cc View 4 chunks +31 lines, -26 lines 0 comments Download
M src/compiler/dead-code-elimination.cc View 5 chunks +13 lines, -13 lines 0 comments Download
M src/compiler/graph-reducer.cc View 2 chunks +11 lines, -17 lines 0 comments Download
M src/compiler/node.h View 7 chunks +95 lines, -58 lines 0 comments Download
M src/compiler/node.cc View 2 chunks +0 lines, -6 lines 0 comments Download

Messages

Total messages: 21 (15 generated)
Leszek Swirski
Hi Jaro and Benedikt, What do you think of this little cleanup? I don't see ...
3 years, 11 months ago (2017-01-06 17:28:03 UTC) #8
Leszek Swirski
Ping for review.
3 years, 11 months ago (2017-01-10 09:46:29 UTC) #9
Jarin
Yeah, the compiler cannot really remember the inline/outline state if there is a function call ...
3 years, 11 months ago (2017-01-10 10:53:39 UTC) #10
Leszek Swirski
Addressed your comments Jaro, I had a bit of fun analysing the disassembly of an ...
3 years, 11 months ago (2017-01-10 12:03:38 UTC) #13
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/2617123002/40001
3 years, 11 months ago (2017-01-10 13:53:26 UTC) #18
commit-bot: I haz the power
3 years, 11 months ago (2017-01-10 13:55:09 UTC) #21
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/v8/v8/+/6873f14b60bd2747c0a3a4650fc17a3186c...

Powered by Google App Engine
This is Rietveld 408576698