Chromium Code Reviews

Issue 21055011: First implementation of allocation elimination in Hydrogen. (Closed)

Created:
7 years, 4 months ago by Michael Starzinger
Modified:
7 years, 4 months ago
Reviewers:
titzer
CC:
v8-dev
Visibility:
Public.

Description

First implementation of allocation elimination in Hydrogen. This change implements a simple data-flow analysis pass over captured objects to the existing escape analysis. It tracks the state of values in the Hydrogen graph through CapturedObject marker instructions that are used to construct an appropriate translation for the deoptimizer to be able to materialize these objects again. This can be considered a combination of scalar replacement of loads and stores on captured objects and sinking of unused allocations. R=titzer@chromium.org TEST=mjsunit/compiler/escape-analysis Committed: http://code.google.com/p/v8/source/detail?r=16098

Patch Set 1 #

Patch Set 2 : Minor cleanup. #

Total comments: 22

Patch Set 3 : Addressed comments by Ben Titzer. #

Patch Set 4 : Ported to x64 and ARM architectures. #

Total comments: 6

Patch Set 5 : Addressed moar comments by Ben Titzer. #

Patch Set 6 : Rebased. #

Unified diffs Side-by-side diffs Stats (+1098 lines, -236 lines)
M src/arm/lithium-arm.h View 1 chunk +2 lines, -1 line 0 comments
M src/arm/lithium-arm.cc View 5 chunks +46 lines, -18 lines 0 comments
M src/arm/lithium-codegen-arm.h View 1 chunk +5 lines, -2 lines 0 comments
M src/arm/lithium-codegen-arm.cc View 1 chunk +41 lines, -21 lines 0 comments
M src/deoptimizer.h View 6 chunks +53 lines, -4 lines 0 comments
M src/deoptimizer.cc View 15 chunks +236 lines, -57 lines 0 comments
M src/factory.h View 1 chunk +5 lines, -1 line 0 comments
M src/factory.cc View 1 chunk +3 lines, -2 lines 0 comments
M src/heap.h View 1 chunk +1 line, -1 line 0 comments
M src/heap.cc View 5 chunks +17 lines, -16 lines 0 comments
M src/hydrogen.cc View 2 chunks +3 lines, -2 lines 0 comments
M src/hydrogen-escape-analysis.h View 1 chunk +33 lines, -2 lines 0 comments
M src/hydrogen-escape-analysis.cc View 1 chunk +226 lines, -0 lines 0 comments
M src/hydrogen-instructions.h View 5 chunks +49 lines, -20 lines 0 comments
M src/ia32/lithium-codegen-ia32.h View 1 chunk +5 lines, -2 lines 0 comments
M src/ia32/lithium-codegen-ia32.cc View 1 chunk +41 lines, -21 lines 0 comments
M src/ia32/lithium-ia32.h View 1 chunk +2 lines, -1 line 0 comments
M src/ia32/lithium-ia32.cc View 5 chunks +46 lines, -18 lines 0 comments
M src/lithium.h View 4 chunks +45 lines, -0 lines 0 comments
M src/objects.cc View 1 chunk +8 lines, -1 line 0 comments
M src/x64/lithium-codegen-x64.h View 2 chunks +6 lines, -3 lines 0 comments
M src/x64/lithium-codegen-x64.cc View 1 chunk +41 lines, -21 lines 0 comments
M src/x64/lithium-x64.h View 1 chunk +2 lines, -1 line 0 comments
M src/x64/lithium-x64.cc View 5 chunks +46 lines, -18 lines 0 comments
M src/zone.h View 2 chunks +2 lines, -3 lines 0 comments
A test/mjsunit/compiler/escape-analysis.js View 1 chunk +134 lines, -0 lines 0 comments

Messages

Total messages: 6 (0 generated)
Michael Starzinger
First prototype is ready. There are a couple of open issue, hence the escape analysis ...
7 years, 4 months ago (2013-07-31 13:13:40 UTC) #1
titzer
https://codereview.chromium.org/21055011/diff/3001/src/hydrogen-escape-analysis.cc File src/hydrogen-escape-analysis.cc (right): https://codereview.chromium.org/21055011/diff/3001/src/hydrogen-escape-analysis.cc#newcode74 src/hydrogen-escape-analysis.cc:74: for (int i = 0; i < graph()->blocks()->length(); i++) ...
7 years, 4 months ago (2013-08-01 17:11:50 UTC) #2
Michael Starzinger
Addressed comments. Starting with architecture ports. PTAL. https://codereview.chromium.org/21055011/diff/3001/src/hydrogen-escape-analysis.cc File src/hydrogen-escape-analysis.cc (right): https://codereview.chromium.org/21055011/diff/3001/src/hydrogen-escape-analysis.cc#newcode74 src/hydrogen-escape-analysis.cc:74: for (int ...
7 years, 4 months ago (2013-08-05 15:13:00 UTC) #3
titzer
LGTM with some comments https://codereview.chromium.org/21055011/diff/28001/src/heap.cc File src/heap.cc (right): https://codereview.chromium.org/21055011/diff/28001/src/heap.cc#newcode4516 src/heap.cc:4516: Map* map, PretenureFlag pretenure) { ...
7 years, 4 months ago (2013-08-06 12:15:46 UTC) #4
Michael Starzinger
Addressed comments. Rebasing. Landing. https://codereview.chromium.org/21055011/diff/28001/src/heap.cc File src/heap.cc (right): https://codereview.chromium.org/21055011/diff/28001/src/heap.cc#newcode4516 src/heap.cc:4516: Map* map, PretenureFlag pretenure) { ...
7 years, 4 months ago (2013-08-07 10:51:16 UTC) #5
Michael Starzinger
7 years, 4 months ago (2013-08-07 11:24:29 UTC) #6
Message was sent while issue was closed.
Committed patchset #6 manually as r16098 (presubmit successful).

Powered by Google App Engine