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

Issue 2309953002: [turbofan] Introduce dedicated NumberToBoolean operator. (Closed)

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

Description

[turbofan] Introduce dedicated NumberToBoolean operator. Previously we always lowered JSToBoolean(x:Number) to the subgraph NumberLessThan(0.0, NumberAbs(x)), which deals with both 0, -0 and NaNs appropriately. However this doesn't always generate the best, especially when we can later derive from feedback that x is always an Integral32 value, where the ideal code would be just a single comparison to 0 w/o the absolute value computation. R=mvstanton@chromium.org BUG=v8:5267, v8:5270 Committed: https://crrev.com/c071a8f0ca096c28a1c6bf7a5d1304f121d027ff Cr-Commit-Position: refs/heads/master@{#39194}

Patch Set 1 #

Patch Set 2 : Fix unittest. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -9 lines) Patch
M src/compiler/js-typed-lowering.cc View 1 chunk +3 lines, -5 lines 0 comments Download
M src/compiler/opcodes.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/operation-typer.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/compiler/simplified-lowering.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 2 chunks +45 lines, -0 lines 0 comments Download
M src/compiler/simplified-operator.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/simplified-operator.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/compiler/verifier.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M test/unittests/compiler/js-typed-lowering-unittest.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 16 (10 generated)
Benedikt Meurer
4 years, 3 months ago (2016-09-06 06:06:24 UTC) #1
Benedikt Meurer
Hey Michael, Here's another low hanging fruit that we missed so far. Please take a ...
4 years, 3 months ago (2016-09-06 06:07:02 UTC) #4
mvstanton
lgtm
4 years, 3 months ago (2016-09-06 08:14:40 UTC) #11
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/2309953002/20001
4 years, 3 months ago (2016-09-06 08:48:04 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-09-06 08:54:26 UTC) #14
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 08:55:01 UTC) #16
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/c071a8f0ca096c28a1c6bf7a5d1304f121d027ff
Cr-Commit-Position: refs/heads/master@{#39194}

Powered by Google App Engine
This is Rietveld 408576698