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

Issue 417043003: Implement shrinking reductions in CPS IR (Closed)

Created:
6 years, 4 months ago by jgruber1
Modified:
6 years, 4 months ago
CC:
reviews_dartlang.org, floitsch
Visibility:
Public.

Description

Implement shrinking reductions in CPS IR Shrinking reductions consist of * dead-cont: letprim x = V in K -> K (x not free in K), * dead-val: letcont k x = L in K -> K (k not free in K), * beta-cont-lin: letcont k x = K in C[k y] ->C[K[y/x]] (k not free in C), and * eta-cont: letcont k x = j x in K -> K[j/k] as described in 'Compiling with Continuations, Continued' by Andrew Kennedy. This also requires adding parent pointers to both Node and Reference classes as well as setting them in a separate pass. BUG= R=kmillikin@google.com, sigurdm@google.com Committed: https://code.google.com/p/dart/source/detail?r=39087

Patch Set 1 #

Patch Set 2 : Remove unused method #

Total comments: 6

Patch Set 3 : Addressed comments, fixed several bugs exposed by later commits #

Total comments: 32

Patch Set 4 : Addressed comments, pt. 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+725 lines, -2 lines) Patch
M sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_nodes.dart View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/cps_ir/optimizers.dart View 1 2 1 chunk +8 lines, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/cps_ir/redundant_phi.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download
A sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart View 1 2 3 1 chunk +471 lines, -0 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
A tests/compiler/dart2js/backend_dart/opt_shrinking_test.dart View 1 2 1 chunk +237 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
jgruber1
6 years, 4 months ago (2014-07-31 15:09:40 UTC) #1
sigurdm
lgtm https://codereview.chromium.org/417043003/diff/20001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart File sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart (right): https://codereview.chromium.org/417043003/diff/20001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart#newcode63 sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart:63: if (!_redexVisitor.isDeadVal(task.node)) { Add comment why this can ...
6 years, 4 months ago (2014-08-01 09:09:41 UTC) #2
jgruber1
Fixed several issues exposed by later commits and tests, ptal. https://codereview.chromium.org/417043003/diff/20001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart File sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart (right): https://codereview.chromium.org/417043003/diff/20001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart#newcode63 ...
6 years, 4 months ago (2014-08-07 09:07:36 UTC) #3
Kevin Millikin (Google)
This is promising. Here's a first round of comments. https://codereview.chromium.org/417043003/diff/40001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart File sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart (right): https://codereview.chromium.org/417043003/diff/40001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart#newcode38 sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart:38: ...
6 years, 4 months ago (2014-08-11 08:59:03 UTC) #4
jgruber1
https://codereview.chromium.org/417043003/diff/40001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart File sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart (right): https://codereview.chromium.org/417043003/diff/40001/sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart#newcode38 sdk/lib/_internal/compiler/implementation/cps_ir/shrinking_reductions.dart:38: void _removeNode(InteriorNode node) { On 2014/08/11 08:59:02, kmillikin wrote: ...
6 years, 4 months ago (2014-08-11 13:00:59 UTC) #5
Kevin Millikin (Google)
Yes, LGTM.
6 years, 4 months ago (2014-08-11 13:16:27 UTC) #6
jgruber1
6 years, 4 months ago (2014-08-11 13:18:15 UTC) #7
Message was sent while issue was closed.
Committed patchset #4 manually as 39087 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698