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

Issue 1573693002: dart2js cps: Hoist loop-invariant branches from loop entry. (Closed)

Created:
4 years, 11 months ago by asgerf
Modified:
4 years, 11 months 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: Hoist loop-invariant branches from loop entry. Performs the following optimization: b = COND while (true) { if (b) BRANCH (contains no continue to loop) else LOOP } ==> b = COND if (b) BRANCH else while (true) LOOP BUG= R=sra@google.com Committed: https://github.com/dart-lang/sdk/commit/41412aaa70f5c5af51e7d35ed5237a42d7c6b8d9

Patch Set 1 #

Total comments: 6

Patch Set 2 : Remove self-import #

Unified diffs Side-by-side diffs Delta from patch set Stats (+347 lines, -28 lines) Patch
M pkg/compiler/lib/src/cps_ir/cps_fragment.dart View 1 1 chunk +22 lines, -14 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/cps_ir_nodes.dart View 1 2 chunks +40 lines, -8 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/loop_hierarchy.dart View 6 chunks +31 lines, -6 lines 0 comments Download
A pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart View 1 chunk +252 lines, -0 lines 0 comments Download
M pkg/compiler/lib/src/cps_ir/optimizers.dart View 1 chunk +1 line, -0 lines 0 comments Download
M pkg/compiler/lib/src/js_backend/codegen/task.dart View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
asgerf
4 years, 11 months ago (2016-01-08 23:42:42 UTC) #2
Siggi Cherem (dart-lang)
minor drive-by comment https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir/cps_fragment.dart File pkg/compiler/lib/src/cps_ir/cps_fragment.dart (right): https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir/cps_fragment.dart#newcode13 pkg/compiler/lib/src/cps_ir/cps_fragment.dart:13: import 'cps_fragment.dart'; remove self import?
4 years, 11 months ago (2016-01-08 23:51:34 UTC) #3
sra1
lgtm https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart File pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart (right): https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart#newcode98 pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart:98: /// This only works because [AlphaRenamer] cleans up ...
4 years, 11 months ago (2016-01-09 01:07:14 UTC) #4
asgerf
Committed patchset #2 (id:20001) manually as 41412aaa70f5c5af51e7d35ed5237a42d7c6b8d9 (presubmit successful).
4 years, 11 months ago (2016-01-11 18:06:43 UTC) #6
asgerf
4 years, 11 months ago (2016-01-11 19:07:07 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir...
File pkg/compiler/lib/src/cps_ir/cps_fragment.dart (right):

https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir...
pkg/compiler/lib/src/cps_ir/cps_fragment.dart:13: import 'cps_fragment.dart';
On 2016/01/08 23:51:34, Siggi Cherem (dart-lang) wrote:
> remove self import?

I must have been confused when I wrote that

https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir...
File pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart (right):

https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir...
pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart:98: /// This only works
because [AlphaRenamer] cleans up after this pass.
On 2016/01/09 01:07:14, sra1 wrote:
> 'after this pass' -> 'at the end of this pass'.

Sorry, I thought I fixed this. I'll put up another CL for it.

https://codereview.chromium.org/1573693002/diff/1/pkg/compiler/lib/src/cps_ir...
pkg/compiler/lib/src/cps_ir/loop_invariant_branch.dart:131: // Check if this is
a loop starting with a branch.
On 2016/01/09 01:07:14, sra1 wrote:
> It would be nice if there was a quick way to test this before computing
> loopHierarchy.

Acknowledged.

Powered by Google App Engine
This is Rietveld 408576698