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

Issue 11232063: Enable merging of comparisons into branches in checked mode. (Closed)

Created:
8 years, 2 months ago by Florian Schneider
Modified:
8 years, 2 months ago
Reviewers:
srdjan
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Enable merging of comparisons into branches in checked mode. Instead of inserting an explicit type check at branches, the branch instruction checks the input for boolean itself: "if (a < b)" will be translated by the flowgraph builder like this: CheckedBranch(a < b) before it would look like this: t1 <- (a < b) t2 <- AssertBool(t1) Branch(t2 === true) Also in this change: flow_graph_optimizer.cc contains a small fix of an assert triggered when running with --trace-optimization. Committed: https://code.google.com/p/dart/source/detail?r=14006

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -40 lines) Patch
M runtime/vm/flow_graph_builder.cc View 3 chunks +6 lines, -7 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/intermediate_language.h View 3 chunks +5 lines, -2 lines 2 comments Download
M runtime/vm/intermediate_language_ia32.cc View 3 chunks +30 lines, -15 lines 2 comments Download
M runtime/vm/intermediate_language_x64.cc View 3 chunks +30 lines, -15 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Florian Schneider
8 years, 2 months ago (2012-10-23 16:18:43 UTC) #1
srdjan
LGTM https://codereview.chromium.org/11232063/diff/1/runtime/vm/intermediate_language.h File runtime/vm/intermediate_language.h (right): https://codereview.chromium.org/11232063/diff/1/runtime/vm/intermediate_language.h#newcode1519 runtime/vm/intermediate_language.h:1519: bool is_checked_; const https://codereview.chromium.org/11232063/diff/1/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://codereview.chromium.org/11232063/diff/1/runtime/vm/intermediate_language_ia32.cc#newcode205 ...
8 years, 2 months ago (2012-10-23 18:06:05 UTC) #2
Florian Schneider
8 years, 2 months ago (2012-10-24 13:02:09 UTC) #3
https://chromiumcodereview.appspot.com/11232063/diff/1/runtime/vm/intermediat...
File runtime/vm/intermediate_language.h (right):

https://chromiumcodereview.appspot.com/11232063/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language.h:1519: bool is_checked_;
On 2012/10/23 18:06:06, srdjan wrote:
> const 

Done.

https://chromiumcodereview.appspot.com/11232063/diff/1/runtime/vm/intermediat...
File runtime/vm/intermediate_language_ia32.cc (right):

https://chromiumcodereview.appspot.com/11232063/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language_ia32.cc:205: __ j(EQUAL, &done,
Assembler::kNearJump);
On 2012/10/23 18:06:06, srdjan wrote:
> Would it be faster to get cid of reg and check if it is Boolean?

I have not measured that yet, but I'll do a measurement once this is landed.

Powered by Google App Engine
This is Rietveld 408576698