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

Issue 2029413005: [builtins] Migrate Math.log to TurboFan. (Closed)

Created:
4 years, 6 months ago by Benedikt Meurer
Modified:
4 years, 6 months ago
Reviewers:
Yang, ahaas
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

[builtins] Migrate Math.log to TurboFan. Introduce a dedicated Float64Log machine operator, that is either implemented by a direct C call or by platform specific code, i.e. using the FPU on x64 and ia32. This operator is used to implement Math.log as a proper TurboFan builtin on top of the CodeStubAssembler. Also introduce a NumberLog simplified operator on top of Float64Log and use that for the fast inline path of Math.log inside TurboFan optimized code. BUG=v8:5065 Committed: https://crrev.com/f2da19fe393124c517f9949183e988e669e4f628 Cr-Commit-Position: refs/heads/master@{#36703}

Patch Set 1 #

Patch Set 2 : Strength reduction. Ports. #

Patch Set 3 : Fix typo. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -118 lines) Patch
M src/bootstrapper.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/builtins.h View 2 chunks +3 lines, -0 lines 0 comments Download
M src/builtins.cc View 1 chunk +12 lines, -0 lines 0 comments Download
M src/compiler/arm/code-generator-arm.cc View 1 1 chunk +13 lines, -0 lines 0 comments Download
M src/compiler/arm/instruction-codes-arm.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/arm/instruction-scheduler-arm.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/arm/instruction-selector-arm.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 1 chunk +10 lines, -0 lines 2 comments Download
M src/compiler/arm64/instruction-codes-arm64.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/arm64/instruction-scheduler-arm64.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/code-assembler.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 1 chunk +10 lines, -0 lines 0 comments Download
M src/compiler/ia32/instruction-codes-ia32.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ia32/instruction-scheduler-ia32.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/instruction-selector.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.cc View 2 chunks +14 lines, -0 lines 0 comments Download
M src/compiler/machine-operator.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/machine-operator.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/machine-operator-reducer.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/mips/code-generator-mips.cc View 1 1 chunk +12 lines, -0 lines 0 comments Download
M src/compiler/mips/instruction-codes-mips.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/mips/instruction-selector-mips.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/mips64/code-generator-mips64.cc View 1 1 chunk +12 lines, -0 lines 0 comments Download
M src/compiler/mips64/instruction-codes-mips64.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/mips64/instruction-selector-mips64.cc View 1 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/opcodes.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/representation-change.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 chunk +6 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 2 chunks +3 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M src/compiler/x64/instruction-codes-x64.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/x64/instruction-scheduler-x64.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/contexts.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/crankshaft/hydrogen.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/crankshaft/hydrogen.cc View 1 chunk +0 lines, -9 lines 0 comments Download
M src/js/math.js View 5 chunks +4 lines, -10 lines 0 comments Download
M src/runtime/runtime.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/runtime/runtime-maths.cc View 1 chunk +0 lines, -13 lines 0 comments Download
M src/third_party/fdlibm/fdlibm.js View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/compiler/test-run-machops.cc View 1 chunk +14 lines, -0 lines 2 comments Download
D test/mjsunit/regress/regress-1246.js View 1 chunk +0 lines, -82 lines 2 comments Download
M test/unittests/compiler/machine-operator-reducer-unittest.cc View 1 2 chunks +14 lines, -1 line 0 comments Download

Messages

Total messages: 17 (9 generated)
Benedikt Meurer
Hey Yang, Here's the starter, Math.log. :-) Please take a look. Thanks, Benedikt
4 years, 6 months ago (2016-06-03 07:48:08 UTC) #6
ahaas
https://codereview.chromium.org/2029413005/diff/40001/test/cctest/compiler/test-run-machops.cc File test/cctest/compiler/test-run-machops.cc (right): https://codereview.chromium.org/2029413005/diff/40001/test/cctest/compiler/test-run-machops.cc#newcode5501 test/cctest/compiler/test-run-machops.cc:5501: CHECK(std::isnan(m.Call(std::numeric_limits<double>::quiet_NaN()))); Aren't these checks included in the FOR_FLOAT64_INPUTS anyways?
4 years, 6 months ago (2016-06-03 09:32:49 UTC) #8
Benedikt Meurer
https://codereview.chromium.org/2029413005/diff/40001/test/cctest/compiler/test-run-machops.cc File test/cctest/compiler/test-run-machops.cc (right): https://codereview.chromium.org/2029413005/diff/40001/test/cctest/compiler/test-run-machops.cc#newcode5501 test/cctest/compiler/test-run-machops.cc:5501: CHECK(std::isnan(m.Call(std::numeric_limits<double>::quiet_NaN()))); Yes, but I want to make them explicit. ...
4 years, 6 months ago (2016-06-03 09:40:29 UTC) #9
Yang
lgtm https://codereview.chromium.org/2029413005/diff/40001/src/compiler/arm64/code-generator-arm64.cc File src/compiler/arm64/code-generator-arm64.cc (right): https://codereview.chromium.org/2029413005/diff/40001/src/compiler/arm64/code-generator-arm64.cc#newcode1246 src/compiler/arm64/code-generator-arm64.cc:1246: // TODO(dcarney): implement directly. See note in lithium-codegen-arm64.cc ...
4 years, 6 months ago (2016-06-03 09:41:43 UTC) #10
Benedikt Meurer
https://codereview.chromium.org/2029413005/diff/40001/src/compiler/arm64/code-generator-arm64.cc File src/compiler/arm64/code-generator-arm64.cc (right): https://codereview.chromium.org/2029413005/diff/40001/src/compiler/arm64/code-generator-arm64.cc#newcode1246 src/compiler/arm64/code-generator-arm64.cc:1246: // TODO(dcarney): implement directly. See note in lithium-codegen-arm64.cc Copy ...
4 years, 6 months ago (2016-06-03 09:45:03 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2029413005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2029413005/40001
4 years, 6 months ago (2016-06-03 09:45:25 UTC) #13
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-03 09:47:32 UTC) #15
commit-bot: I haz the power
4 years, 6 months ago (2016-06-03 09:48:39 UTC) #17
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/f2da19fe393124c517f9949183e988e669e4f628
Cr-Commit-Position: refs/heads/master@{#36703}

Powered by Google App Engine
This is Rietveld 408576698