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

Issue 990963003: [turbofan] Unify Math.floor / Math.ceil optimization. (Closed)

Created:
5 years, 9 months ago by Benedikt Meurer
Modified:
5 years, 9 months ago
Reviewers:
Sven Panne, Yang
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Unify Math.floor / Math.ceil optimization. Provide an intrinsic %MathFloor / %_MathFloor that is used to optimize both Math.ceil and Math.floor, and use the JS inlining mechanism to inline Math.ceil into TurboFan code. Although we need to touch code outside of TurboFan to make this work, this does not affect the way we handle Math.ceil and/or Math.floor in CrankShaft, because for CrankShaft the old-style builtin function id based inlining still kicks in first. Once this solution is stabilized, we can use it for Math.floor as well. And once that is settled, we can establish it as the unified way to inline builtins, and get rid of the specialized builtin function id based inlining at some point. Note that "builtin" applies to basically every piece of internal JavaScript/intrinsics based code, so this also applies to the yet to be defined JavaScript based code stubs and handlers. BUG=v8:3953 LOG=n R=yangguo@chromium.org,svenpanne@chromium.org Committed: https://crrev.com/022ea7e05779f07b9327bcc2d4709fc80b2aeecb Cr-Commit-Position: refs/heads/master@{#27086}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -245 lines) Patch
M src/compiler/arm/code-generator-arm.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M src/compiler/arm/instruction-codes-arm.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/compiler/arm/instruction-selector-arm.cc View 3 chunks +17 lines, -15 lines 0 comments Download
M src/compiler/arm64/code-generator-arm64.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M src/compiler/arm64/instruction-codes-arm64.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 3 chunks +17 lines, -9 lines 0 comments Download
M src/compiler/ia32/code-generator-ia32.cc View 1 chunk +4 lines, -15 lines 0 comments Download
M src/compiler/ia32/instruction-codes-ia32.h View 1 chunk +1 line, -3 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 4 chunks +20 lines, -15 lines 0 comments Download
M src/compiler/instruction-selector.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M src/compiler/js-builtin-reducer.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/compiler/js-builtin-reducer.cc View 2 chunks +3 lines, -18 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-intrinsic-lowering.cc View 2 chunks +8 lines, -0 lines 0 comments Download
M src/compiler/machine-operator.h View 2 chunks +8 lines, -11 lines 0 comments Download
M src/compiler/machine-operator.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/compiler/opcodes.h View 1 chunk +1 line, -2 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/compiler/typer.cc View 2 chunks +2 lines, -7 lines 0 comments Download
M src/compiler/verifier.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/compiler/x64/code-generator-x64.cc View 1 chunk +4 lines, -15 lines 0 comments Download
M src/compiler/x64/instruction-codes-x64.h View 1 chunk +1 line, -3 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 4 chunks +19 lines, -14 lines 0 comments Download
M src/hydrogen.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M src/ia32/assembler-ia32.h View 2 chunks +8 lines, -7 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/math.js View 2 chunks +2 lines, -13 lines 0 comments Download
M src/runtime/runtime.h View 2 chunks +1 line, -1 line 0 comments Download
M src/runtime/runtime-maths.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/x64/assembler-x64.h View 2 chunks +8 lines, -7 lines 0 comments Download
M src/x64/assembler-x64.cc View 1 chunk +1 line, -2 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/compiler/test-run-machops.cc View 3 chunks +10 lines, -7 lines 0 comments Download
M test/unittests/compiler/js-builtin-reducer-unittest.cc View 2 chunks +2 lines, -38 lines 0 comments Download
M test/unittests/compiler/machine-operator-unittest.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 chunk +1 line, -2 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 chunk +1 line, -2 lines 0 comments Download
M tools/check-name-clashes.py View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 8 (1 generated)
Benedikt Meurer
5 years, 9 months ago (2015-03-10 06:54:29 UTC) #1
Benedikt Meurer
Yang, Sven: PTAL
5 years, 9 months ago (2015-03-10 06:54:53 UTC) #2
Sven Panne
lgtm
5 years, 9 months ago (2015-03-10 08:40:51 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/990963003/1
5 years, 9 months ago (2015-03-10 08:41:11 UTC) #5
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 9 months ago (2015-03-10 08:42:53 UTC) #6
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/022ea7e05779f07b9327bcc2d4709fc80b2aeecb Cr-Commit-Position: refs/heads/master@{#27086}
5 years, 9 months ago (2015-03-10 08:42:59 UTC) #7
rossberg
5 years, 9 months ago (2015-03-10 10:28:43 UTC) #8
Message was sent while issue was closed.
You have put in the wrong issue number. ;)

Powered by Google App Engine
This is Rietveld 408576698