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

Issue 10831404: When replacing an instruction with another in GVN-like optimizations, try to find a better user of … (Closed)

Created:
8 years, 4 months ago by ngeoffray
Modified:
8 years, 4 months ago
Reviewers:
kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

When replacing an instruction with another in GVN-like optimizations, try to find a better user of it, that knows more about the type. Committed: https://code.google.com/p/dart/source/detail?r=11039

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -4 lines) Patch
M lib/compiler/implementation/ssa/nodes.dart View 1 2 chunks +40 lines, -0 lines 0 comments Download
M lib/compiler/implementation/ssa/optimize.dart View 3 chunks +5 lines, -2 lines 0 comments Download
M tests/compiler/dart2js/compiler_helper.dart View 1 chunk +2 lines, -2 lines 0 comments Download
A tests/compiler/dart2js/rewrite_better_user_test.dart View 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ngeoffray
8 years, 4 months ago (2012-08-21 10:31:23 UTC) #1
kasperl
LGTM. https://chromiumcodereview.appspot.com/10831404/diff/1/lib/compiler/implementation/ssa/nodes.dart File lib/compiler/implementation/ssa/nodes.dart (right): https://chromiumcodereview.appspot.com/10831404/diff/1/lib/compiler/implementation/ssa/nodes.dart#newcode613 lib/compiler/implementation/ssa/nodes.dart:613: List<HCheck> better = <HCheck>[]; Wouldn't a Link<HCheck> be ...
8 years, 4 months ago (2012-08-21 10:37:41 UTC) #2
ngeoffray
8 years, 4 months ago (2012-08-21 10:43:54 UTC) #3
Thanks Kasper

https://chromiumcodereview.appspot.com/10831404/diff/1/lib/compiler/implement...
File lib/compiler/implementation/ssa/nodes.dart (right):

https://chromiumcodereview.appspot.com/10831404/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/nodes.dart:613: List<HCheck> better =
<HCheck>[];
On 2012/08/21 10:37:41, kasperl wrote:
> Wouldn't a Link<HCheck> be more efficient here? The common case is probably
that
> we do not need to allocate a list.

Done.

https://chromiumcodereview.appspot.com/10831404/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/nodes.dart:615: if (user is HCheck && (user as
HCheck).checkedInput == to) {
On 2012/08/21 10:37:41, kasperl wrote:
> ===

Done.

https://chromiumcodereview.appspot.com/10831404/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/nodes.dart:1041: while (current != null) {
On 2012/08/21 10:37:41, kasperl wrote:
> !==

Done.

https://chromiumcodereview.appspot.com/10831404/diff/1/lib/compiler/implement...
lib/compiler/implementation/ssa/nodes.dart:1042: if (current == other) return
true;
On 2012/08/21 10:37:41, kasperl wrote:
> ===

Done.

Powered by Google App Engine
This is Rietveld 408576698