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

Issue 10544133: Don't reference transitioned elements in loop pre header (Closed)

Created:
8 years, 6 months ago by Zheng Liu
Modified:
8 years ago
Reviewers:
Massi, danno
CC:
v8-dev, zheng.z.liu
Visibility:
Public.

Description

Don't reference transitioned elements in hoisted instructions. Test=imaging-desaturate slightly faster

Patch Set 1 #

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -0 lines) Patch
M src/hydrogen.cc View 1 3 chunks +27 lines, -0 lines 1 comment Download

Messages

Total messages: 5 (0 generated)
Zheng Liu
Around ~11% in imaging-desaturate on my machine. Zheng Liu zheng.z.liu@intel.com
8 years, 6 months ago (2012-06-13 10:00:41 UTC) #1
danno
In general, this isn't a good idea. AFAICT, you can't be sure that an HElementsTransition ...
8 years, 6 months ago (2012-06-14 09:53:59 UTC) #2
Zheng Liu
On 2012/06/14 09:53:59, danno wrote: > In general, this isn't a good idea. AFAICT, you ...
8 years, 6 months ago (2012-06-14 13:41:32 UTC) #3
Zheng Liu
With latest v8, stock imaging-desaturate doesn't generate TransitionElementsKind. The effect can be observed by training ...
8 years, 6 months ago (2012-06-15 02:37:37 UTC) #4
danno
8 years, 6 months ago (2012-06-19 15:45:05 UTC) #5
I've thought about this some more, and this approach seems a little too specific
and even a bit hacky, even ignoring the algorithmic complexity. 

If this optimization is worth while (BTW, what is the maximum win), it should
apply to all transitions in all blocks, not just pre-headers. 

It seems to me that are one of two approaches that seems better, but they are
more work:

1) Add a general pass that make sure that all uses of the input to a transition
that are dominated by the transition are canonicalized to the transition. You
might be able to fold this in to the logic in the GVN block processing where
there is special handling of transitions and somehow use the
loop-successor-dominator information so that the additional overhead isn't too
high, but I didn't really do a deep analysis.

2) Tweak the GVN equals check for CheckMaps to treat map checks dominated by
corresponding transition-dependent map check as equal. This is probably a bit
tricky, since there are assumptions about calculating the hash code of a HValues
based on its inputs, and this change would treat HValues with different inputs
as the same.

https://chromiumcodereview.appspot.com/10544133/diff/6001/src/hydrogen.cc
File src/hydrogen.cc (right):

https://chromiumcodereview.appspot.com/10544133/diff/6001/src/hydrogen.cc#new...
src/hydrogen.cc:1826: }
This is potentially a n^2 algorithm with respect to the number of instructions
in the pre header. This is not the right way to do this.

Powered by Google App Engine
This is Rietveld 408576698