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

Issue 2755353003: dart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes. (Closed)

Created:
3 years, 9 months ago by sra1
Modified:
3 years, 8 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js: Insert HTypeKnown refinement nodes on dominated edges of HPhi nodes. Consider: value ??= ""; We fail to infer in SSA type progagation that value is non-null. At CFG level this looks like if (value == null) { value = ""; } else { // There is always an empty else-block. } value1 = phi("", value); Previously we considered the phi use of 'value' to be outside the region dominated by the condition 'value != null', leaving nowhere to attach the type refinement. Now we consider it inside the region, allowing: if (value == null) { value = ""; } else { value1 = HTypeKnown(not-null, value); } value2 = phi("", value1); Type propagation now determines value2 is non-null. R=efortuna@google.com Committed: https://github.com/dart-lang/sdk/commit/49e78d7e32dd26b25fb7def5b62f26fde1870675

Patch Set 1 #

Total comments: 3

Patch Set 2 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+164 lines, -63 lines) Patch
M pkg/compiler/lib/src/ssa/nodes.dart View 1 3 chunks +130 lines, -52 lines 0 comments Download
M pkg/compiler/lib/src/ssa/optimize.dart View 1 4 chunks +31 lines, -10 lines 0 comments Download
M pkg/compiler/lib/src/ssa/types_propagation.dart View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 14 (9 generated)
sra1
3 years, 9 months ago (2017-03-21 07:04:49 UTC) #8
sra1
https://codereview.chromium.org/2755353003/diff/120001/pkg/compiler/lib/src/ssa/types_propagation.dart File pkg/compiler/lib/src/ssa/types_propagation.dart (right): https://codereview.chromium.org/2755353003/diff/120001/pkg/compiler/lib/src/ssa/types_propagation.dart#newcode411 pkg/compiler/lib/src/ssa/types_propagation.dart:411: receiver.replaceAllUsersDominatedBy(converted.next, converted); We should try to reuse the computed ...
3 years, 9 months ago (2017-03-22 23:01:22 UTC) #9
sra1
3 years, 8 months ago (2017-04-03 18:26:53 UTC) #11
Emily Fortuna
lgtm https://codereview.chromium.org/2755353003/diff/120001/pkg/compiler/lib/src/ssa/nodes.dart File pkg/compiler/lib/src/ssa/nodes.dart (right): https://codereview.chromium.org/2755353003/diff/120001/pkg/compiler/lib/src/ssa/nodes.dart#newcode1418 pkg/compiler/lib/src/ssa/nodes.dart:1418: if (--usersInCurrentBlock == 0) break; small preference for ...
3 years, 8 months ago (2017-04-03 20:48:46 UTC) #12
sra1
3 years, 8 months ago (2017-04-06 17:44:16 UTC) #14
Message was sent while issue was closed.
Committed patchset #2 (id:140001) manually as
49e78d7e32dd26b25fb7def5b62f26fde1870675 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698