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

Issue 1114163005: [turbofan] Fix tail call optimization. (Closed)

Created:
5 years, 7 months ago by Benedikt Meurer
Modified:
5 years, 7 months ago
Reviewers:
Jarin
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] Fix tail call optimization. Tail calls are matched on the graph, with a dedicated tail call optimization that is actually testable. The instruction selection can still fall back to a regular if the platform constraints don't allow to emit a tail call (i.e. the return locations of caller and callee differ or the callee takes non-register parameters, which is a restriction that will be removed in the future). Also explicitly limit tail call optimization to stubs for now and drop the global flag. BUG=v8:4076 LOG=n Committed: https://crrev.com/d21de2a48bc63823876d3f9bf52753f9da0aea6b Cr-Commit-Position: refs/heads/master@{#28219}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1063 lines, -191 lines) Patch
M BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/arm/instruction-selector-arm.cc View 4 chunks +95 lines, -16 lines 2 comments Download
M src/compiler/arm64/instruction-selector-arm64.cc View 3 chunks +118 lines, -13 lines 0 comments Download
M src/compiler/common-operator.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/common-operator.cc View 2 chunks +21 lines, -3 lines 0 comments Download
M src/compiler/ia32/instruction-selector-ia32.cc View 3 chunks +92 lines, -15 lines 0 comments Download
M src/compiler/instruction-selector.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/instruction-selector.cc View 7 chunks +13 lines, -47 lines 0 comments Download
M src/compiler/machine-type.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/mips/instruction-selector-mips.cc View 3 chunks +95 lines, -14 lines 0 comments Download
M src/compiler/mips64/instruction-selector-mips64.cc View 3 chunks +95 lines, -14 lines 0 comments Download
M src/compiler/node.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/node.cc View 1 chunk +15 lines, -0 lines 0 comments Download
M src/compiler/opcodes.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/pipeline.cc View 2 chunks +4 lines, -0 lines 0 comments Download
M src/compiler/schedule.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/compiler/schedule.cc View 2 chunks +10 lines, -0 lines 0 comments Download
M src/compiler/scheduler.cc View 2 chunks +11 lines, -0 lines 0 comments Download
A src/compiler/tail-call-optimization.h View 1 chunk +40 lines, -0 lines 0 comments Download
A src/compiler/tail-call-optimization.cc View 1 chunk +83 lines, -0 lines 0 comments Download
M src/compiler/typer.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/verifier.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/x64/instruction-selector-x64.cc View 3 chunks +93 lines, -16 lines 0 comments Download
M src/flag-definitions.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/globals.h View 1 chunk +0 lines, -2 lines 0 comments Download
M src/hydrogen-instructions.h View 1 chunk +3 lines, -0 lines 0 comments Download
M test/unittests/compiler/instruction-selector-unittest.cc View 2 chunks +0 lines, -48 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 chunk +5 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 2 chunks +71 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download
M test/unittests/compiler/scheduler-unittest.cc View 2 chunks +16 lines, -0 lines 0 comments Download
A test/unittests/compiler/tail-call-optimization-unittest.cc View 1 chunk +160 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Benedikt Meurer
Hey Jaro, This is the initial fix for TCO, making the optimization itself testable and ...
5 years, 7 months ago (2015-05-05 05:34:11 UTC) #2
Jarin
lgtm. https://codereview.chromium.org/1114163005/diff/1/src/compiler/arm/instruction-selector-arm.cc File src/compiler/arm/instruction-selector-arm.cc (right): https://codereview.chromium.org/1114163005/diff/1/src/compiler/arm/instruction-selector-arm.cc#newcode1177 src/compiler/arm/instruction-selector-arm.cc:1177: FrameStateDescriptor* frame_state_descriptor = There seems to be some ...
5 years, 7 months ago (2015-05-05 09:15:24 UTC) #3
Benedikt Meurer
https://codereview.chromium.org/1114163005/diff/1/src/compiler/arm/instruction-selector-arm.cc File src/compiler/arm/instruction-selector-arm.cc (right): https://codereview.chromium.org/1114163005/diff/1/src/compiler/arm/instruction-selector-arm.cc#newcode1177 src/compiler/arm/instruction-selector-arm.cc:1177: FrameStateDescriptor* frame_state_descriptor = As said, we will unify VisitCall ...
5 years, 7 months ago (2015-05-05 09:40:21 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1114163005/1
5 years, 7 months ago (2015-05-05 09:40:41 UTC) #6
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 7 months ago (2015-05-05 09:43:05 UTC) #7
commit-bot: I haz the power
5 years, 7 months ago (2015-05-05 09:43:19 UTC) #8
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/d21de2a48bc63823876d3f9bf52753f9da0aea6b
Cr-Commit-Position: refs/heads/master@{#28219}

Powered by Google App Engine
This is Rietveld 408576698