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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_propagation.dart

Issue 1560963002: Do TypePropagation again after inlining (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: fix tests Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
index aa26e319231398246ef0cd811da339ff54222879..4f03ce2f94c6fea0a675d1084c75b0aa2b65106c 100644
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
@@ -714,8 +714,10 @@ class TypePropagator extends Pass {
final CpsFunctionCompiler _functionCompiler;
final Map<Variable, ConstantValue> _values= <Variable, ConstantValue>{};
final ConstantPropagationLattice _lattice;
+ final bool recomputeAll;
- TypePropagator(CpsFunctionCompiler functionCompiler)
+ TypePropagator(CpsFunctionCompiler functionCompiler,
+ {this.recomputeAll: false})
: _functionCompiler = functionCompiler,
_lattice = new ConstantPropagationLattice(functionCompiler);
@@ -731,7 +733,7 @@ class TypePropagator extends Pass {
_values,
_internalError);
- analyzer.analyze(root);
+ analyzer.analyze(root, recomputeAll);
// Transform. Uses the data acquired in the previous analysis phase to
// replace branches with fixed targets and side-effect-free expressions
@@ -2288,8 +2290,11 @@ class TypePropagationVisitor implements Visitor {
this.values,
this.internalError);
- void analyze(FunctionDefinition root) {
+ void analyze(FunctionDefinition root, bool recomputeAll) {
reachableContinuations.clear();
+ if (recomputeAll) {
+ new ResetAnalysisInfo(reachableContinuations, values).visit(root);
+ }
// Initially, only the root node is reachable.
push(root);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/codegen/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698