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

Issue 2734253002: [turbofan] Propagate minus-zero truncation in representation inference. (Closed)

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

Description

[turbofan] Propagate minus-zero truncation in representation inference. This introduces a new truncation bit for truncation of minus-zero to zero. At the moment it is only used to handle the limit cases of deopt, such as the one in the Google maps workload (see simplified version below), where the -q (which is desugared to q * -1.0) currently deoptimizes because the result would produce minus zero. To handle this situation, we exploit the knowledge that righthand side of + cannot be -0, so even if lefthand side was -0, the result would still be 0 (so the + operation cannot distinguish between left hand side 0 and -0). function f(q) { q -= 4; return (-q) + q; } f(10); f(10); %OptimizeFunctionOnNextCall(f); f(4); Review-Url: https://codereview.chromium.org/2734253002 Cr-Commit-Position: refs/heads/master@{#43661} Committed: https://chromium.googlesource.com/v8/v8/+/18f169d46cb4602fe3ee92900501aaf469c76000

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+111 lines, -51 lines) Patch
M src/compiler/representation-change.h View 6 chunks +55 lines, -27 lines 0 comments Download
M src/compiler/representation-change.cc View 5 chunks +31 lines, -6 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 5 chunks +21 lines, -10 lines 0 comments Download
M test/cctest/compiler/test-representation-change.cc View 1 chunk +4 lines, -8 lines 0 comments Download

Messages

Total messages: 15 (9 generated)
Jarin
Could you take a look, please?
3 years, 9 months ago (2017-03-07 22:54:32 UTC) #4
Benedikt Meurer
Nice. LGTM with nits.
3 years, 9 months ago (2017-03-08 03:56:41 UTC) #7
Benedikt Meurer
https://codereview.chromium.org/2734253002/diff/1/src/compiler/simplified-lowering.cc File src/compiler/simplified-lowering.cc (right): https://codereview.chromium.org/2734253002/diff/1/src/compiler/simplified-lowering.cc#newcode1229 src/compiler/simplified-lowering.cc:1229: IdentifyZeros lhs_identify_zeros = truncation.identify_zeros(); Nit: left instead of lbs ...
3 years, 9 months ago (2017-03-08 03:56:53 UTC) #8
Jarin
https://codereview.chromium.org/2734253002/diff/1/src/compiler/simplified-lowering.cc File src/compiler/simplified-lowering.cc (right): https://codereview.chromium.org/2734253002/diff/1/src/compiler/simplified-lowering.cc#newcode1229 src/compiler/simplified-lowering.cc:1229: IdentifyZeros lhs_identify_zeros = truncation.identify_zeros(); On 2017/03/08 03:56:53, Benedikt Meurer ...
3 years, 9 months ago (2017-03-08 05:46:51 UTC) #9
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/2734253002/20001
3 years, 9 months ago (2017-03-08 05:48:45 UTC) #12
commit-bot: I haz the power
3 years, 9 months ago (2017-03-08 06:11:44 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/18f169d46cb4602fe3ee92900501aaf469c...

Powered by Google App Engine
This is Rietveld 408576698