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

Issue 12212093: Convert some compiler passes to preserve valid def-use chains. (Closed)

Created:
7 years, 10 months ago by Kevin Millikin (Google)
Modified:
7 years, 10 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Convert some compiler passes to preserve valid def-use chains. Change the ApplyICData, ApplyClassIds, Canonicalize, and SelectRepresentations passes to preserve valid use lists. Committed: https://code.google.com/p/dart/source/detail?r=18676

Patch Set 1 #

Total comments: 14

Patch Set 2 : Incorporated review comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -486 lines) Patch
M runtime/vm/compiler.cc View 1 3 chunks +0 lines, -10 lines 0 comments Download
M runtime/vm/flow_graph.h View 2 chunks +10 lines, -6 lines 0 comments Download
M runtime/vm/flow_graph.cc View 5 chunks +44 lines, -6 lines 0 comments Download
M runtime/vm/flow_graph_inliner.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 4 chunks +28 lines, -8 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 43 chunks +310 lines, -399 lines 0 comments Download
M runtime/vm/il_printer.cc View 1 7 chunks +7 lines, -7 lines 0 comments Download
M runtime/vm/intermediate_language.h View 1 9 chunks +15 lines, -13 lines 0 comments Download
M runtime/vm/intermediate_language.cc View 1 5 chunks +37 lines, -31 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Google)
7 years, 10 months ago (2013-02-08 15:53:06 UTC) #1
Vyacheslav Egorov (Google)
LGTM with comments addressed (especially the one about ForwardInstructionIterator::ReplaceCurrentWith) https://codereview.chromium.org/12212093/diff/1/runtime/vm/flow_graph.cc File runtime/vm/flow_graph.cc (right): https://codereview.chromium.org/12212093/diff/1/runtime/vm/flow_graph.cc#newcode213 runtime/vm/flow_graph.cc:213: ...
7 years, 10 months ago (2013-02-08 16:44:49 UTC) #2
Kevin Millikin (Google)
7 years, 10 months ago (2013-02-19 10:49:30 UTC) #3
https://codereview.chromium.org/12212093/diff/1/runtime/vm/flow_graph.cc
File runtime/vm/flow_graph.cc (right):

https://codereview.chromium.org/12212093/diff/1/runtime/vm/flow_graph.cc#newc...
runtime/vm/flow_graph.cc:213: (instr->previous() != NULL));
On 2013/02/08 16:44:49, Vyacheslav Egorov (Google) wrote:
> Consider changing WasEliminated() and using it:
> 
> bool WasEliminated() const {
>   ASSERT(!IsGraphEntry());
>   return !IsPhi() && instr->previous();
> }

I think it's better to (a) remove phis eagerly and (b) not have comparison as an
instruction (it can only be part of a BranchInstr or a "BoolifyInstr").

As it is, WasEliminated above just gives false negatives for phis and false
positives for comparisons.  That seems misleading to expose as a general
predicate blessed by an API, so I'd rather just keep the verification low level.

https://codereview.chromium.org/12212093/diff/1/runtime/vm/flow_graph_optimiz...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/12212093/diff/1/runtime/vm/flow_graph_optimiz...
runtime/vm/flow_graph_optimizer.cc:248: boxed->AddInputUse(use);
On 2013/02/08 16:44:49, Vyacheslav Egorov (Google) wrote:
> I don't think these three lines are needed. You can remove them.

You are right.  Thank you.

https://codereview.chromium.org/12212093/diff/1/runtime/vm/flow_graph_optimiz...
runtime/vm/flow_graph_optimizer.cc:1770: T current_instruction) {
I agree the architecture is a mess.  It's a preexisting mess that is, as you
say, confusing.  I'd rather not change it as part of this effort.

https://codereview.chromium.org/12212093/diff/1/runtime/vm/intermediate_langu...
File runtime/vm/intermediate_language.cc (left):

https://codereview.chromium.org/12212093/diff/1/runtime/vm/intermediate_langu...
runtime/vm/intermediate_language.cc:380: Definition* defn =
current_->AsDefinition();
On 2013/02/08 16:44:49, Vyacheslav Egorov (Google) wrote:
> This must come back before you will land it.

Thanks, it was an inadvertent deletion.

Powered by Google App Engine
This is Rietveld 408576698