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

Issue 11299204: Improve constant propagation to handle InstantiateTypeArguments. (Closed)

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

Description

Improve constant propagation to handle InstantiateTypeArguments. If the input to an InstantiateTypeArguments instruction is a constant it can be eliminated and replaced with the constant. Committed: https://code.google.com/p/dart/source/detail?r=15447

Patch Set 1 #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -1 line) Patch
M runtime/vm/flow_graph_optimizer.cc View 2 chunks +15 lines, -1 line 4 comments Download

Messages

Total messages: 5 (0 generated)
Florian Schneider
8 years ago (2012-11-27 16:09:25 UTC) #1
Kevin Millikin (Google)
Transfer function for type arguments seems subtly wrong. LGTM with the fix noted below. https://codereview.chromium.org/11299204/diff/1/runtime/vm/flow_graph_optimizer.cc ...
8 years ago (2012-11-28 07:57:24 UTC) #2
Florian Schneider
https://codereview.chromium.org/11299204/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/11299204/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode3443 runtime/vm/flow_graph_optimizer.cc:3443: if (IsNonConstant(object)) { On 2012/11/28 07:57:25, kmillikin wrote: > ...
8 years ago (2012-11-28 13:02:59 UTC) #3
srdjan
DBC https://codereview.chromium.org/11299204/diff/1/runtime/vm/flow_graph_optimizer.cc File runtime/vm/flow_graph_optimizer.cc (right): https://codereview.chromium.org/11299204/diff/1/runtime/vm/flow_graph_optimizer.cc#newcode3447 runtime/vm/flow_graph_optimizer.cc:3447: if (!object.IsNull() && object.IsTypeArguments()) { You need to ...
8 years ago (2012-11-30 00:49:54 UTC) #4
Florian Schneider
8 years ago (2012-12-04 11:40:09 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/11299204/diff/1/runtime/vm/flow_graph_optimiz...
File runtime/vm/flow_graph_optimizer.cc (right):

https://codereview.chromium.org/11299204/diff/1/runtime/vm/flow_graph_optimiz...
runtime/vm/flow_graph_optimizer.cc:3447: if (!object.IsNull() &&
object.IsTypeArguments()) {
On 2012/11/30 00:49:54, srdjan wrote:
> You need to handle also the case for null otherwise "new List()" is not
> optimized. (check generated code for "new List()" vs "new List<int>()").

Yes, that's a good suggestion. I'll add that case.

Powered by Google App Engine
This is Rietveld 408576698