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

Issue 1414193006: [Interpreter] Removes unnecessary jumps and dead code from If and loops. (Closed)

Created:
5 years, 1 month ago by mythria
Modified:
5 years, 1 month ago
Reviewers:
oth, rmcilroy
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

[Interpreter] Removes unnecessary jumps and dead code from If and loops. Adds an optimization to not emit unnecessary jumps and dead code in If, For, While, and do-while statments. When the value of condition is known at compile time, the code is emitted only for the paths that can be taken. For example, when the condition is known to be true in an if statmenet only then block is generated. BUG=v8:4280 LOG=N Committed: https://crrev.com/77c19034f482c40d215a437751a08854b36c5579 Cr-Commit-Position: refs/heads/master@{#31715}

Patch Set 1 #

Total comments: 14

Patch Set 2 : Addressed review comments #

Total comments: 6

Patch Set 3 : Addressed review comments #

Patch Set 4 : rebased the patch #

Patch Set 5 : Adds a test for generating JumpIfToBoolean for If statement. The earlier tests were optimized out b… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+335 lines, -119 lines) Patch
M src/interpreter/bytecode-generator.cc View 1 2 3 5 chunks +60 lines, -26 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 2 3 4 9 chunks +236 lines, -92 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 3 1 chunk +39 lines, -1 line 0 comments Download

Messages

Total messages: 13 (3 generated)
mythria
Could you please review my changes. Thanks, Mythri https://codereview.chromium.org/1414193006/diff/1/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/1414193006/diff/1/src/interpreter/bytecode-generator.cc#newcode495 src/interpreter/bytecode-generator.cc:495: Are ...
5 years, 1 month ago (2015-10-29 17:23:23 UTC) #2
oth
lgtm. A few minor comments to address, but looks good and output is definitely improved. ...
5 years, 1 month ago (2015-10-30 09:46:19 UTC) #3
mythria
I have addressed review comments except for one in bytecode-generator.cc. I could not remove !stmt->cond()->ToBooleanIsTrue ...
5 years, 1 month ago (2015-10-30 15:07:47 UTC) #4
oth
Thanks for the changes and clarifications. lgtm. https://codereview.chromium.org/1414193006/diff/1/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/1414193006/diff/1/src/interpreter/bytecode-generator.cc#newcode630 src/interpreter/bytecode-generator.cc:630: if (stmt->cond() ...
5 years, 1 month ago (2015-10-30 15:31:34 UTC) #5
rmcilroy
A couple of nits, but lgtm, thanks! https://codereview.chromium.org/1414193006/diff/20001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/1414193006/diff/20001/src/interpreter/bytecode-generator.cc#newcode566 src/interpreter/bytecode-generator.cc:566: Visit(stmt->body()); nit ...
5 years, 1 month ago (2015-10-30 15:49:53 UTC) #6
mythria
Thanks, I addressed all the comments. I will rebase it and commit. https://codereview.chromium.org/1414193006/diff/20001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc ...
5 years, 1 month ago (2015-11-02 10:46:07 UTC) #7
mythria
I added a test for generating JumpIfToBoolean for If statements. The earlier tests were optimized ...
5 years, 1 month ago (2015-11-02 12:12:22 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1414193006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1414193006/80001
5 years, 1 month ago (2015-11-02 15:23:08 UTC) #11
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 1 month ago (2015-11-02 15:24:29 UTC) #12
commit-bot: I haz the power
5 years, 1 month ago (2015-11-02 15:24:55 UTC) #13
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/77c19034f482c40d215a437751a08854b36c5579
Cr-Commit-Position: refs/heads/master@{#31715}

Powered by Google App Engine
This is Rietveld 408576698