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

Issue 2266823002: [turbofan] Insert dummy values when changing from None type. (Closed)

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

Description

[turbofan] Insert dummy values when changing from None type. Currently we choose the MachineRepresentation::kNone representation for values of Type::None, and when converting values from the kNone representation we use "impossible" conversions that will crash at runtime. This assumes that the impossible conversions should never be hit (the only way to produce the impossible values is to perform an always-failing runtime check on a value, such as Smi-checking a string). Note that this assumes that the runtime check is executed before the impossible convesrion. Introducing BitwiseOr type feedback broke this in two ways: - we always pick Word32 representation for bitwise-or, so the impossible conversion does not trigger (it only triggers with None representation), and we could end up with unsupported conversions from Word32. - even if we inserted impossible conversions, they are pure conversions. Since untagging, bitwise-or operations are also pure, we could hoist all these before the smi check of the inputs and we could hit the impossible conversions before we get to the smi check. This CL addresses this by just providing dummy values for conversions from the Type::None type. It also removes the impossible-to-* conversions. BUG=chromium:638132 Committed: https://crrev.com/c83b21ab755f1420b6da85b3ff43d7e96ead9bbe Cr-Commit-Position: refs/heads/master@{#38883}

Patch Set 1 #

Patch Set 2 : Fix arm #

Patch Set 3 : Remove the special casing for deopt. #

Patch Set 4 : Another attempt to fix deopt, fix tracing. #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -202 lines) Patch
M src/bailout-reason.h View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M src/compiler/arm/code-generator-arm.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/instruction-codes.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/compiler/instruction-scheduler.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/compiler/instruction-selector.cc View 1 2 3 4 4 chunks +11 lines, -60 lines 0 comments Download
M src/compiler/machine-operator.h View 1 2 3 4 1 chunk +0 lines, -10 lines 0 comments Download
M src/compiler/machine-operator.cc View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M src/compiler/mips/code-generator-mips.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 1 chunk +0 lines, -6 lines 0 comments Download
M src/compiler/ppc/code-generator-ppc.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/representation-change.cc View 6 chunks +24 lines, -24 lines 0 comments Download
M src/compiler/s390/code-generator-s390.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 2 3 4 chunks +11 lines, -5 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 1 chunk +0 lines, -22 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 1 chunk +0 lines, -8 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M src/compiler/x87/code-generator-x87.cc View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M test/cctest/compiler/test-representation-change.cc View 8 chunks +19 lines, -29 lines 0 comments Download
A test/mjsunit/compiler/regress-638132.js View 1 chunk +26 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (22 generated)
Jarin
Could you take a look, please?
4 years, 4 months ago (2016-08-22 12:19:06 UTC) #18
Michael Starzinger
LGTM.
4 years, 4 months ago (2016-08-24 14:22:20 UTC) #19
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/2266823002/60001
4 years, 4 months ago (2016-08-25 05:12:57 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_asan_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel_ng/builds/7582) v8_linux64_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
4 years, 4 months ago (2016-08-25 05:14:09 UTC) #23
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/2266823002/80001
4 years, 4 months ago (2016-08-25 05:40:24 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-25 06:06:49 UTC) #27
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/c83b21ab755f1420b6da85b3ff43d7e96ead9bbe Cr-Commit-Position: refs/heads/master@{#38883}
4 years, 4 months ago (2016-08-25 06:07:08 UTC) #29
Benedikt Meurer
4 years, 4 months ago (2016-08-25 08:49:05 UTC) #30
Message was sent while issue was closed.
A revert of this CL (patchset #5 id:80001) has been created in
https://codereview.chromium.org/2280613002/ by bmeurer@chromium.org.

The reason for reverting is: Octane/Mandreel aborts with an exception now:

TypeError: __FUNCTION_TABLE__[(r2 >> 2)] is not a function.

Powered by Google App Engine
This is Rietveld 408576698