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

Issue 7216009: Change the handling of stack check on backward branches (Closed)

Created:
9 years, 6 months ago by Søren Thygesen Gjesse
Modified:
9 years, 6 months ago
Reviewers:
fschneider
CC:
v8-dev
Visibility:
Public.

Description

Change the handling of stack check on backward branches The hydrogen stack check instruction is now added to each loop and the stack check handling on the back edge has been removed. This change causes regression on small tight loops as the stack check is now at the top of the loop instead of at the bottom, and that requires one additional unconditional jump per loop iteration. However the reason for this change is to avoid worse regressions for upcoming changes to correctly support debugger break in optimized code. R=fschneider@chromium.org BUG=none TEST=none Committed: http://code.google.com/p/v8/source/detail?r=8428

Patch Set 1 #

Patch Set 2 : Fixed presubmit errors #

Total comments: 2

Patch Set 3 : Changed stack check elimination to remove the stack check instruction #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -205 lines) Patch
M src/arm/lithium-arm.h View 1 2 chunks +7 lines, -4 lines 0 comments Download
M src/arm/lithium-arm.cc View 3 chunks +8 lines, -7 lines 0 comments Download
M src/arm/lithium-codegen-arm.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/arm/lithium-codegen-arm.cc View 1 2 2 chunks +38 lines, -39 lines 0 comments Download
M src/hydrogen.h View 1 4 chunks +14 lines, -2 lines 0 comments Download
M src/hydrogen.cc View 1 2 17 chunks +31 lines, -35 lines 0 comments Download
M src/hydrogen-instructions.h View 1 2 2 chunks +21 lines, -11 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 2 2 chunks +40 lines, -40 lines 0 comments Download
M src/ia32/lithium-ia32.h View 1 2 chunks +7 lines, -4 lines 0 comments Download
M src/ia32/lithium-ia32.cc View 3 chunks +8 lines, -8 lines 0 comments Download
M src/x64/lithium-codegen-x64.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/lithium-codegen-x64.cc View 1 2 2 chunks +35 lines, -37 lines 0 comments Download
M src/x64/lithium-x64.h View 1 2 chunks +7 lines, -4 lines 0 comments Download
M src/x64/lithium-x64.cc View 3 chunks +8 lines, -8 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Søren Thygesen Gjesse
9 years, 6 months ago (2011-06-21 10:25:15 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/7216009/diff/1001/src/hydrogen.cc File src/hydrogen.cc (right): http://codereview.chromium.org/7216009/diff/1001/src/hydrogen.cc#newcode1254 src/hydrogen.cc:1254: block->loop_information()->stack_check()->set_eliminated(true); Idea for improvement: Can you delete the ...
9 years, 6 months ago (2011-06-22 07:41:18 UTC) #2
Søren Thygesen Gjesse
9 years, 6 months ago (2011-06-27 11:07:52 UTC) #3
New patch uploaded.

http://codereview.chromium.org/7216009/diff/1001/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/7216009/diff/1001/src/hydrogen.cc#newcode1254
src/hydrogen.cc:1254:
block->loop_information()->stack_check()->set_eliminated(true);
On 2011/06/22 07:41:18, fschneider wrote:
> Idea for improvement: Can you delete the HStackCheck instruction from the
graph
> instead of marking it here and eliminating it in the code generator? This
would
> eliminate the environment uses before doing register allocation and could
> potentially help shortening live ranges.

Good point. Changed the elimination to unlink the stack check instruction from
the graph instead of having a boolean flag on it.

Powered by Google App Engine
This is Rietveld 408576698