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

Issue 1444363002: dart2js cps: Global value numbering and loop-invariant code motion. (Closed)

Created:
5 years, 1 month ago by asgerf
Modified:
5 years ago
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

dart2js cps: Global value numbering and loop-invariant code motion. There is a new pass for doing GVN and LICM. The 'share interceptors' pass previously GVN'ed and LICM'ed interceptors but now only constifies them and lets GVN handle the rest. The pass has been renamed to optimize_interceptors. The 'share final fields' pass has been removed since GVN does the same. A new pass 'remove redundant refinements' removes some refinement nodes that contribute no information. These would sometimes block code motion for no good reason. This pass is should go away once GVN is able to hoist expressions across refinement guards. BUG= R=sra@google.com Committed: https://github.com/dart-lang/sdk/commit/84b164a52bf7c7d44a55fef7ff94b7c6ba7aa815

Patch Set 1 #

Patch Set 2 : Revert change to cps_ir_builder_task #

Patch Set 3 : Add comment #

Total comments: 35

Patch Set 4 : Extract loop-hoisting code into a method #

Patch Set 5 : Comments #

Patch Set 6 : Actually remove share_final_fields.dart #

Patch Set 7 : Bugfix in hoisting past refinement guards #

Patch Set 8 : Set GetIndex.objectIsNotNull in type propagation #

Patch Set 9 : Add test case #

Total comments: 4

Patch Set 10 : Merge #

Patch Set 11 : Also share GetLazyStatics when in scope of each other #

Patch Set 12 : Fix test case indentation and rename duplicate i->k #

Patch Set 13 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+897 lines, -569 lines) Patch
A pkg/compiler/lib/src/cps_ir/gvn.dart View 1 2 3 4 5 6 7 8 9 10 1 chunk +709 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/loop_effects.dart View 1 2 3 4 4 chunks +13 lines, -3 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart View 1 2 3 4 5 6 7 8 9 1 chunk +22 lines, -0 lines 0 comments Download
A + pkg/compiler/lib/src/cps_ir/optimize_interceptors.dart View 1 2 3 4 5 6 7 8 9 4 chunks +19 lines, -106 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/optimizers.dart View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
A pkg/compiler/lib/src/cps_ir/redundant_refinement.dart View 1 2 3 4 5 6 7 8 9 1 chunk +55 lines, -0 lines 0 comments Download
D pkg/compiler/lib/src/cps_ir/share_final_fields.dart View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -180 lines 0 comments Download
D pkg/compiler/lib/src/cps_ir/share_interceptors.dart View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -274 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_mask_system.dart View 1 2 3 4 1 chunk +6 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/type_propagation.dart View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/task.dart View 2 chunks +5 lines, -2 lines 0 comments Download
A tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +64 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (1 generated)
asgerf
https://codereview.chromium.org/1444363002/diff/40001/pkg/compiler/lib/src/cps_ir/loop_effects.dart File pkg/compiler/lib/src/cps_ir/loop_effects.dart (right): https://codereview.chromium.org/1444363002/diff/40001/pkg/compiler/lib/src/cps_ir/loop_effects.dart#newcode96 pkg/compiler/lib/src/cps_ir/loop_effects.dart:96: 'loop side effects.'; This is similar to the problem ...
5 years, 1 month ago (2015-11-16 15:42:39 UTC) #2
sra1
lgtm. Can you test some of the edge cases, like hoisting a DAG? https://chromiumcodereview.appspot.com/1444363002/diff/40001/pkg/compiler/lib/src/cps_ir/gvn.dart File ...
5 years, 1 month ago (2015-11-17 05:41:15 UTC) #3
asgerf
https://chromiumcodereview.appspot.com/1444363002/diff/40001/pkg/compiler/lib/src/cps_ir/gvn.dart File pkg/compiler/lib/src/cps_ir/gvn.dart (right): https://chromiumcodereview.appspot.com/1444363002/diff/40001/pkg/compiler/lib/src/cps_ir/gvn.dart#newcode142 pkg/compiler/lib/src/cps_ir/gvn.dart:142: if (prim.isSafeForElimination && currentLoopHeader != null) { On 2015/11/17 ...
5 years, 1 month ago (2015-11-17 12:43:43 UTC) #4
sra1
lgtm with test for hoisting a DAG.
5 years, 1 month ago (2015-11-18 23:33:15 UTC) #5
sra1
https://chromiumcodereview.appspot.com/1444363002/diff/160001/tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart File tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart (right): https://chromiumcodereview.appspot.com/1444363002/diff/160001/tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart#newcode16 tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart:16: // Everything can be hoisted out, except the bounds ...
5 years, 1 month ago (2015-11-23 22:35:07 UTC) #6
asgerf
https://chromiumcodereview.appspot.com/1444363002/diff/160001/tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart File tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart (right): https://chromiumcodereview.appspot.com/1444363002/diff/160001/tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart#newcode16 tests/compiler/dart2js/js_backend_cps_ir_gvn_test.dart:16: // Everything can be hoisted out, except the bounds ...
5 years ago (2015-11-24 10:05:59 UTC) #7
asgerf
5 years ago (2015-11-24 11:45:38 UTC) #8
Message was sent while issue was closed.
Committed patchset #13 (id:240001) manually as
84b164a52bf7c7d44a55fef7ff94b7c6ba7aa815 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698