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

Issue 10201017: Introduce Definition and Use types. (Closed)

Created:
8 years, 8 months ago by Kevin Millikin (Google)
Modified:
8 years, 8 months ago
Reviewers:
srdjan
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Introduce Definition and Use types. Make Bind and PickTemp into definitions. Allow values to be uses that name a definition. Begin converting all uses of (named) Temp into Use. R=srdjan@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=6928

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -136 lines) Patch
M runtime/vm/flow_graph_builder.h View 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_builder.cc View 14 chunks +80 lines, -70 lines 2 comments Download
M runtime/vm/flow_graph_compiler_x64.cc View 4 chunks +13 lines, -5 lines 4 comments Download
M runtime/vm/intermediate_language.h View 5 chunks +87 lines, -59 lines 2 comments Download

Messages

Total messages: 3 (0 generated)
Kevin Millikin (Google)
Named temporaries in the IL are being eliminated. Instead, uses point to a definition, and ...
8 years, 8 months ago (2012-04-24 12:56:35 UTC) #1
srdjan
LGTM https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/flow_graph_builder.cc File runtime/vm/flow_graph_builder.cc (right): https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/flow_graph_builder.cc#newcode1680 runtime/vm/flow_graph_builder.cc:1680: ValueGraphVisitor for_instantiator(owner(), temp_index()); Why temp_index() instead of start_index, ...
8 years, 8 months ago (2012-04-24 22:02:18 UTC) #2
Kevin Millikin (Google)
8 years, 8 months ago (2012-04-25 08:50:51 UTC) #3
https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_builder.cc (right):

https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_builder.cc:1680: ValueGraphVisitor
for_instantiator(owner(), temp_index());
On 2012/04/24 22:02:18, srdjan wrote:
> Why temp_index() instead of start_index, it seems wrong?  Also above.

Oops, that's a stray change that crept in here.  I'll set it back to
start_index.

Intermediate-term (but real soon now) I'd like to get rid of the explicit
indexes in the graph builder.  It should be possible to teach the visitor to
track stack height and set it automatically on instructions that need it (e.g.,
Bind) by making adding a definition to the graph increment the stack height and
using a defintion decrement.

https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/flow_graph_...
File runtime/vm/flow_graph_compiler_x64.cc (right):

https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_compiler_x64.cc:450: if (temp == NULL && use == NULL)
return false;
On 2012/04/24 22:02:18, srdjan wrote:
> Use parenthesis

Done.  Thanks for the reminder.

https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/flow_graph_...
runtime/vm/flow_graph_compiler_x64.cc:454: if (current != previous + 1) return
false;
On 2012/04/24 22:02:18, srdjan wrote:
> ditto

Done.

https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/intermediat...
File runtime/vm/intermediate_language.h (right):

https://chromiumcodereview.appspot.com/10201017/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language.h:1295: intptr_t temp_index() const { return
temp_index_; }
On 2012/04/24 22:02:18, srdjan wrote:
> Why don't you need DECLARE_INSTRUCTION(Definition) ?

Because it's an abstract, not concrete, instruction class.  We don't want to
have to implement VisitXXX for those.  (It might be nice to get the predicates
etc. automatically, but in that case we might split into DECLARE_INSTRUCTION and
DECLARE_CONCRETE_INSTRUCTION).

Powered by Google App Engine
This is Rietveld 408576698