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

Issue 11414201: Make HJSArrayLength more likely to have identical GVNs. (Closed)

Created:
8 years ago by Massi
Modified:
7 years, 2 months ago
Reviewers:
danno
CC:
v8-dev
Visibility:
Public.

Description

Make HJSArrayLength more likely to have identical GVNs.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+145 lines, -24 lines) Patch
M src/hydrogen.h View 2 chunks +12 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 6 chunks +100 lines, -5 lines 3 comments Download
M src/hydrogen-instructions.h View 4 chunks +20 lines, -13 lines 0 comments Download
M src/hydrogen-instructions.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M src/ic.cc View 2 chunks +2 lines, -6 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Massi
8 years ago (2012-11-28 10:56:59 UTC) #1
danno
8 years ago (2012-11-28 12:44:31 UTC) #2
I'm afraid this approach fundamentally won't work. You're trying to do GVN
without doing GVN, and that's going to give you incorrect code... e.g. you're
not considering all of the DependsOn/Changes relationships, etc. That's why I am
very, very wary of any approach that doesn't use the full infrastructure that is
in place for dependencies, and Change/DependsOn.

https://chromiumcodereview.appspot.com/11414201/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

https://chromiumcodereview.appspot.com/11414201/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:734: // First, find the set of HJSArrayLength insts that operate
on the same
please don't use abbreviations, "insts" should be "instructions" everywhere in
your CL.

https://chromiumcodereview.appspot.com/11414201/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:741: while (group_end_index < array_lengths_.length() &&
This algorithm is a no-go. It  is quadratic with respect to
array_lengths_.length().

https://chromiumcodereview.appspot.com/11414201/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:764: map_check = current_map_check;
This is not sufficient and leads to incorrect code. If an intervening operation
changes array lengths, you will combine one or more length operations that are
not equivalent. That's why we have DependsOn and Changes in GVN in the first
place.

Powered by Google App Engine
This is Rietveld 408576698