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

Issue 303263010: Remove forced type changes when they can't deopt (Closed)

Created:
6 years, 6 months ago by m.m.capewell
Modified:
6 years, 6 months ago
CC:
v8-dev
Visibility:
Public.

Description

Remove forced type changes when they can't deopt Hydrogen attempts to force representation changes on certain operations in order to deoptimise on the change rather than the operation. However, these forced changes are often unnecessary on 64-bit platforms, and cause poor code generation, so this patch makes some of them conditional on whether it's possible for deoptimisation to occur in the change. On ARM64, this prevents sequences like: ;;; <@46,#89> smi-tag 0x7ff282c7f050 144 lsl x4, x4, #32 ;;; <@48,#90> smi-untag 0x7ff282c7f054 148 asr x5, x4, #32 ;;; <@50,#31> mul-const-i-s 0x7ff282c7f058 152 lsl w6, w5, #3 BUG= R=jkummerow@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=21818

Patch Set 1 #

Patch Set 2 : Remove ForceRepresentation in representation change phase. #

Total comments: 6

Patch Set 3 : Address Jakob's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -7 lines) Patch
M src/hydrogen-representation-changes.cc View 1 2 2 chunks +32 lines, -7 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
m.m.capewell
There remains a similar tag/untag sequence caused by the forced representation change for BuildUncheckedMonomorphicElementAccess(). However, ...
6 years, 6 months ago (2014-06-02 14:33:06 UTC) #1
ulan
Looks good. Adding Jakob to reviewers.
6 years, 6 months ago (2014-06-03 07:24:26 UTC) #2
Jakob Kummerow
On 2014/06/02 14:33:06, m.m.capewell wrote: > the representation is unknown at the point that the ...
6 years, 6 months ago (2014-06-03 08:08:49 UTC) #3
m.m.capewell
OK, took a while to get working, but here's a version that removes non-deopting HChanges ...
6 years, 6 months ago (2014-06-09 14:27:52 UTC) #4
Jakob Kummerow
Much better. We could consider adding the logic when the HForceRepresentation is the use, so ...
6 years, 6 months ago (2014-06-12 10:16:50 UTC) #5
m.m.capewell
6 years, 6 months ago (2014-06-12 14:45:41 UTC) #6
Jakob Kummerow
LGTM. Do existing tests exercise this code path? If not, please add a test that ...
6 years, 6 months ago (2014-06-12 14:59:06 UTC) #7
m.m.capewell
Yes, this code is triggered regularly on 64-bit platforms; the output example above is from ...
6 years, 6 months ago (2014-06-12 15:37:48 UTC) #8
m.m.capewell
6 years, 6 months ago (2014-06-12 16:47:58 UTC) #9
Message was sent while issue was closed.
Committed patchset #3 manually as r21818 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698