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

Issue 1007103003: cps-ir: Merge variables based on set-based liveness and graph coloring. (Closed)

Created:
5 years, 9 months ago by asgerf
Modified:
5 years, 8 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

cps-ir: Merge variables based on set-based liveness and graph coloring. RegisterAllocator and CopyPropagator have been removed. Variables are merged after StatementRewriter. This simplifies CPS->Tree translation is a little bit since the mapping to variables is one-to-one. The StatementRewriter has a more SSA-like input, but has to be more aggressive when looking for a redex. It now looks through a chain of phi-assignments to check if two statements can be combined, whereas before it would only combine two identical jumps. I haven't been able to measure a significant slowdown, though I'm sure it is at least a little bit slower. R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=44962

Patch Set 1 #

Total comments: 70

Patch Set 2 : Clarify that empty blocks are read by default #

Patch Set 3 : Interleaved blocks, gen/kill sets, comments #

Patch Set 4 : Updated TODO about reprocessing #

Patch Set 5 : Missed a few comments #

Total comments: 1

Patch Set 6 : Comment #

Patch Set 7 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+717 lines, -619 lines) Patch
M pkg/analyzer2dart/test/end2end_data.dart View 3 chunks +17 lines, -5 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 2 3 4 5 6 3 chunks +4 lines, -282 lines 0 comments Download
M pkg/compiler/lib/src/dart_backend/backend.dart View 2 chunks +1 line, -6 lines 0 comments Download
M pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M pkg/compiler/lib/src/dart_backend/dart_backend.dart View 1 2 3 4 5 6 1 chunk +1 line, -2 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/task.dart View 2 chunks +1 line, -5 lines 0 comments Download
D pkg/compiler/lib/src/tree_ir/optimization/copy_propagator.dart View 1 chunk +0 lines, -266 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/loop_rewriter.dart View 1 1 chunk +0 lines, -7 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/optimization.dart View 2 chunks +5 lines, -2 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart View 1 2 3 4 5 6 3 chunks +27 lines, -10 lines 0 comments Download
A pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart View 1 2 3 4 5 1 chunk +614 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart View 1 2 3 4 5 6 7 chunks +15 lines, -30 lines 0 comments Download
M tests/compiler/dart2js/js_backend_cps_ir_interceptors_test.dart View 2 chunks +3 lines, -3 lines 0 comments Download
A tests/language/catch_liveness_test.dart View 1 2 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
asgerf
5 years, 9 months ago (2015-03-19 14:39:19 UTC) #2
Kevin Millikin (Google)
Some small comments, I'm still reviewing the variable merger file. https://codereview.chromium.org/1007103003/diff/1/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart File pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart (right): https://codereview.chromium.org/1007103003/diff/1/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart#newcode401 ...
5 years, 9 months ago (2015-03-20 11:12:04 UTC) #3
Kevin Millikin (Google)
I think the algorithm looks good. I have a lot of suggestions for more comments, ...
5 years, 9 months ago (2015-03-26 14:35:55 UTC) #4
asgerf
I went ahead and switched to interleaved blocks and gen/kill sets. I don't like implementing ...
5 years, 9 months ago (2015-03-27 15:18:28 UTC) #5
asgerf
PTAL. Following our offline discussion about reprocessing expressions: I fixed it in the upcoming CL ...
5 years, 8 months ago (2015-03-31 11:50:39 UTC) #6
asgerf
(Missed a few comments in my first pass) Please see previous message. https://codereview.chromium.org/1007103003/diff/1/pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart File pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart ...
5 years, 8 months ago (2015-03-31 12:14:19 UTC) #7
Kevin Millikin (Google)
Very much nicer. LGTM and STV. https://codereview.chromium.org/1007103003/diff/80001/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart File pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart (right): https://codereview.chromium.org/1007103003/diff/80001/pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart#newcode82 pkg/compiler/lib/src/tree_ir/optimization/variable_merger.dart:82: void addRead(Variable variable) ...
5 years, 8 months ago (2015-04-07 14:03:00 UTC) #8
asgerf
5 years, 8 months ago (2015-04-08 10:59:39 UTC) #9
Message was sent while issue was closed.
Committed patchset #7 (id:120001) manually as 44962 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698