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

Issue 2202413002: [turbofan] Improve typing rule for modulus. (Closed)

Created:
4 years, 4 months ago by Benedikt Meurer
Modified:
4 years, 4 months ago
Reviewers:
Jarin
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Improve typing rule for modulus. Infer a more precise type even in case where NaN and/or -0 is a possible outcome of the operation, and use this more precise type to improve code generation for the modulus itself by trying harder to stick to Word32 operations instead of going to Float64, and also optimize the pattern where we compare the output of x % y to some non-zero integer constant K, in which case we can truncate the output of x % y to Word32 if the type of x % y is Signed32/Unsigned32 \/ NaN \/ MinusZero, as NaN and MinusZero will both be truncated to zero, which cannot match the non zero constant K. R=jarin@chromium.org Committed: https://crrev.com/17a7f5839684872b72d4fe9e6d2cfb5876e85af7 Cr-Commit-Position: refs/heads/master@{#38267}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Some cleanup plus use type feedback properly. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+201 lines, -113 lines) Patch
M src/compiler/operation-typer.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/compiler/operation-typer.cc View 2 chunks +58 lines, -45 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 7 chunks +106 lines, -32 lines 0 comments Download
M src/type-cache.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M src/types.h View 1 1 chunk +37 lines, -33 lines 0 comments Download

Messages

Total messages: 13 (7 generated)
Benedikt Meurer
4 years, 4 months ago (2016-08-02 18:52:14 UTC) #1
Benedikt Meurer
Hey Jaro, Here's some nice optimization for the various modulus operators in the Kraken crypto ...
4 years, 4 months ago (2016-08-02 19:06:00 UTC) #4
Jarin
lgtm https://codereview.chromium.org/2202413002/diff/1/src/compiler/simplified-lowering.cc File src/compiler/simplified-lowering.cc (right): https://codereview.chromium.org/2202413002/diff/1/src/compiler/simplified-lowering.cc#newcode680 src/compiler/simplified-lowering.cc:680: bool OneInputCannotBe(Node* node, Type* type) { I have ...
4 years, 4 months ago (2016-08-02 20:02:09 UTC) #7
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/2202413002/20001
4 years, 4 months ago (2016-08-03 03:55:21 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-03 04:39:02 UTC) #11
commit-bot: I haz the power
4 years, 4 months ago (2016-08-03 04:41:45 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/17a7f5839684872b72d4fe9e6d2cfb5876e85af7
Cr-Commit-Position: refs/heads/master@{#38267}

Powered by Google App Engine
This is Rietveld 408576698