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

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

Created:
6 years, 7 months ago by Florian Schneider
Modified:
6 years, 7 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=vegorov@google.com Committed: https://code.google.com/p/dart/source/detail?r=35669

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -13 lines) Patch
M runtime/vm/compiler.cc View 1 chunk +2 lines, -1 line 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 2 chunks +11 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 chunks +82 lines, -10 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 chunk +4 lines, -0 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 chunk +16 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Florian Schneider
6 years, 7 months ago (2014-05-01 20:06:00 UTC) #1
Vyacheslav Egorov (Google)
lgtm https://codereview.chromium.org/261823005/diff/20001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/261823005/diff/20001/runtime/vm/flow_graph_optimizer.cc#newcode8517 runtime/vm/flow_graph_optimizer.cc:8517: if (changed) { Maybe we should update the ...
6 years, 7 months ago (2014-05-01 22:57:05 UTC) #2
Florian Schneider
https://codereview.chromium.org/261823005/diff/20001/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/261823005/diff/20001/runtime/vm/flow_graph_optimizer.cc#newcode8517 runtime/vm/flow_graph_optimizer.cc:8517: if (changed) { On 2014/05/01 22:57:05, Vyacheslav Egorov (Google) ...
6 years, 7 months ago (2014-05-01 23:11:34 UTC) #3
Florian Schneider
6 years, 7 months ago (2014-05-01 23:17:30 UTC) #4
Message was sent while issue was closed.
Committed patchset #3 manually as r35669 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698