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

Issue 10778029: Allow uint32 value on optimized frames if they are consumed by safe operations. (Closed)

Created:
8 years, 5 months ago by Vyacheslav Egorov (Google)
Modified:
8 years, 4 months ago
Reviewers:
Massi, danno
CC:
v8-dev
Visibility:
Public.

Description

Allow uint32 value on optimized frames if they are consumed by safe operations. Safe operations are those that either do not observe unsignedness or have special support for uint32 values: - all binary bitwise operations: they perform ToInt32 on inputs; - >> and << shifts: they perform ToInt32 on left hand side and ToUint32 on right hand side; - >>> shift: it performs ToUint32 on both inputs; - stores to integer external arrays (not pixel, float or double ones): these stores are "bitwise"; - HChange: special support added for conversions of uint32 values to double and tagged values; - HSimulate: special support added for deoptimization with uint32 values in registers and stack slots; - HPhi: phis that have only safe uses and only uint32 operands are uint32 themselves. BUG=v8:2097 TEST=test/mjsunit/compiler/uint32.js Committed: https://code.google.com/p/v8/source/detail?r=12367

Patch Set 1 #

Patch Set 2 : handle phis, fix canonicalization bug #

Patch Set 3 : arm and x64 ports #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1048 lines, -117 lines) Patch
M src/arm/lithium-arm.h View 1 2 4 chunks +22 lines, -0 lines 0 comments Download
M src/arm/lithium-arm.cc View 1 2 4 chunks +27 lines, -12 lines 0 comments Download
M src/arm/lithium-codegen-arm.h View 1 2 2 chunks +6 lines, -2 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 8 chunks +71 lines, -18 lines 0 comments Download
M src/arm/simulator-arm.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/deoptimizer.h View 1 4 chunks +15 lines, -0 lines 1 comment Download
M src/deoptimizer.cc View 1 13 chunks +169 lines, -28 lines 0 comments Download
M src/flag-definitions.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/globals.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/hydrogen.h View 1 3 chunks +9 lines, -0 lines 0 comments Download
M src/hydrogen.cc View 1 5 chunks +238 lines, -2 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 chunks +12 lines, -1 line 0 comments Download
M src/hydrogen-instructions.cc View 1 2 chunks +7 lines, -3 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 1 2 chunks +6 lines, -2 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 8 chunks +70 lines, -16 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 4 chunks +24 lines, -0 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 1 3 chunks +28 lines, -11 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 1 chunk +18 lines, -0 lines 0 comments Download
M src/lithium.h View 1 3 chunks +14 lines, -1 line 0 comments Download
M src/objects.cc View 1 2 chunks +14 lines, -0 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 7 chunks +88 lines, -8 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 4 chunks +24 lines, -0 lines 0 comments Download
M src/x64/lithium-x64.cc View 1 2 3 chunks +27 lines, -11 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 2 chunks +26 lines, -0 lines 0 comments Download
A test/mjsunit/compiler/uint32.js View 1 1 chunk +120 lines, -0 lines 1 comment Download

Messages

Total messages: 4 (0 generated)
Vyacheslav Egorov (Google)
This is request for comments (not for commit, lacks full ARM/x64 support). But it passes ...
8 years, 5 months ago (2012-07-17 12:23:45 UTC) #1
Vyacheslav Egorov (Google)
Hi again, The change has been cleaned up and extended. Ports to ia32 and x64 ...
8 years, 4 months ago (2012-08-15 12:42:48 UTC) #2
Massi
http://codereview.chromium.org/10778029/diff/6001/src/deoptimizer.h File src/deoptimizer.h (right): http://codereview.chromium.org/10778029/diff/6001/src/deoptimizer.h#newcode681 src/deoptimizer.h:681: if (value <= static_cast<uint32_t>(Smi::kMaxValue)) { Maybe having a Smi::IsValidUint(uint32_t ...
8 years, 4 months ago (2012-08-16 13:57:55 UTC) #3
danno
8 years, 4 months ago (2012-08-21 13:55:26 UTC) #4
Fundamentally LGTM. However, if there is anyway to beef up the tests to make
sure that all of the cases in the uint32 tracking algorithm are covered, please
add them.

http://codereview.chromium.org/10778029/diff/6001/test/mjsunit/compiler/uint3...
File test/mjsunit/compiler/uint32.js (right):

http://codereview.chromium.org/10778029/diff/6001/test/mjsunit/compiler/uint3...
test/mjsunit/compiler/uint32.js:120: assertEquals(K4 | 0, NonUint32Phi(false,
K3, K4));
Please add tests for phi usages of phis.

Powered by Google App Engine
This is Rietveld 408576698