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

Issue 23549020: Optimize conditional branches that have same true/false targets. (Closed)

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

Description

Optimize conditional branches that have same true/false targets. Branches that have the same true/false target, or where both target blocks reach the same common join block via empty blocks can be replaced by a goto to the common join block. In code like this var a = unknown(); var b = null; if (a == null || b == null) { ... } it eliminates the test (a == null) if b is known to be null. Until now, the compiler could only eliminate the test for b, if a was known. R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=28050

Patch Set 1 #

Total comments: 13

Patch Set 2 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -21 lines) Patch
M runtime/vm/compiler.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_compiler.cc View 1 2 chunks +1 line, -8 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 2 chunks +11 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 3 chunks +68 lines, -10 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 2 chunks +6 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 1 chunk +24 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Florian Schneider
This is part of the ongoing work to seamlessly inline == operator calls. It allows ...
7 years, 3 months ago (2013-09-09 15:47:17 UTC) #1
Kevin Millikin (Google)
LGTM. I have some suggested naming improvements. https://codereview.chromium.org/23549020/diff/1/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): https://codereview.chromium.org/23549020/diff/1/runtime/vm/compiler.cc#newcode460 runtime/vm/compiler.cc:460: ConstantPropagator::RemoveRedundantBranches(flow_graph); Since ...
7 years, 2 months ago (2013-09-27 11:03:43 UTC) #2
srdjan
DBC https://codereview.chromium.org/23549020/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/23549020/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode6707 runtime/vm/flow_graph_optimizer.cc:6707: // Traverses a chain of empty blocks and ...
7 years, 2 months ago (2013-09-27 15:44:11 UTC) #3
Florian Schneider
https://codereview.chromium.org/23549020/diff/1/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): https://codereview.chromium.org/23549020/diff/1/runtime/vm/compiler.cc#newcode460 runtime/vm/compiler.cc:460: ConstantPropagator::RemoveRedundantBranches(flow_graph); On 2013/09/27 11:03:43, kmillikin wrote: > Since Optimize ...
7 years, 2 months ago (2013-09-30 12:19:23 UTC) #4
Kevin Millikin (Google)
https://codereview.chromium.org/23549020/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/23549020/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode6702 runtime/vm/flow_graph_optimizer.cc:6702: return block->next()->IsGoto() Nah, it's not necessary.
7 years, 2 months ago (2013-09-30 12:27:40 UTC) #5
Florian Schneider
7 years, 2 months ago (2013-09-30 12:41:41 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 manually as r28050 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698