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

Issue 16813002: Make constant propagation to fold x == x and re-run type propagation for better range analysis. (Closed)

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

Description

Make constant propagation to fold x == x and re-run type propagation for better range analysis. 1. When comparing numbers, or strict-comparing objects, this can be folded into true/false. Since this often occurs after inlining and store-to-load forwarding, constant propagation is repeated after these phases. The pattern looks like: o.x = o.y; if (o.x == o.y) { ... } 2. Load elimination may introduce new phis that may have smi-type. In order to get range information for these phis, I added a second phase of type propagation after load elimination. R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=23901

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -69 lines) Patch
M runtime/vm/compiler.cc View 1 3 chunks +8 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 4 chunks +23 lines, -29 lines 4 comments Download
M runtime/vm/intermediate_language_arm.cc View 1 4 chunks +3 lines, -9 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 4 chunks +3 lines, -9 lines 0 comments Download
M runtime/vm/intermediate_language_mips.cc View 1 4 chunks +3 lines, -9 lines 0 comments Download
M runtime/vm/intermediate_language_x64.cc View 1 4 chunks +3 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Florian Schneider
7 years, 6 months ago (2013-06-12 09:17:08 UTC) #1
Kevin Millikin (Google)
LGTM. https://codereview.chromium.org/16813002/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/16813002/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode5190 runtime/vm/flow_graph_optimizer.cc:5190: if (!instr->is_checked_strict_equal()) break; I have two things to ...
7 years, 6 months ago (2013-06-12 10:02:44 UTC) #2
Florian Schneider
https://codereview.chromium.org/16813002/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/16813002/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode5190 runtime/vm/flow_graph_optimizer.cc:5190: if (!instr->is_checked_strict_equal()) break; On 2013/06/12 10:02:44, kmillikin wrote: > ...
7 years, 6 months ago (2013-06-12 10:11:20 UTC) #3
Florian Schneider
7 years, 6 months ago (2013-06-12 10:12:00 UTC) #4
Florian Schneider
Committed patchset #2 manually as r23901 (presubmit successful).
7 years, 6 months ago (2013-06-12 10:27:22 UTC) #5
srdjan
Not LGTM as there is a bug in the code: Please add the following test: ...
7 years, 6 months ago (2013-06-12 16:37:51 UTC) #6
Florian Schneider
I uploaded a fix for this: https://codereview.chromium.org/16853005/ Thanks for the catch. https://codereview.chromium.org/16813002/diff/7002/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): ...
7 years, 6 months ago (2013-06-13 08:15:43 UTC) #7
Lasse Reichstein Nielsen
https://codereview.chromium.org/16813002/diff/7002/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/16813002/diff/7002/runtime/vm/flow_graph_optimizer.cc#newcode5189 runtime/vm/flow_graph_optimizer.cc:5189: RawObject::IsNumberClassId(instr->receiver_class_id())) { Is this correct? I.e. if var NAN ...
7 years, 6 months ago (2013-06-13 08:21:25 UTC) #8
Lasse Reichstein Nielsen
7 years, 6 months ago (2013-06-13 08:21:25 UTC) #9
Message was sent while issue was closed.

          

Powered by Google App Engine
This is Rietveld 408576698