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

Issue 12051013: Cleanup how we handle side effects in HInstruction and put the right flags for HIs, modulo, truncat… (Closed)

Created:
7 years, 11 months ago by ngeoffray
Modified:
7 years, 11 months ago
Reviewers:
kasperl
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Cleanup how we handle side effects in HInstruction and put the right flags for HIs, modulo, truncate divide, and shift left. Committed: https://code.google.com/p/dart/source/detail?r=17441

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -179 lines) Patch
M sdk/lib/_internal/compiler/implementation/ssa/builder.dart View 1 3 chunks +6 lines, -4 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart View 1 4 chunks +12 lines, -19 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/nodes.dart View 1 2 31 chunks +96 lines, -148 lines 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/optimize.dart View 1 2 chunks +1 line, -1 line 0 comments Download
M sdk/lib/_internal/compiler/implementation/ssa/tracer.dart View 1 1 chunk +12 lines, -4 lines 0 comments Download
M tests/compiler/dart2js/gvn_test.dart View 1 1 chunk +14 lines, -3 lines 0 comments Download
M tests/compiler/dart2js/mock_compiler.dart View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
ngeoffray
This also fixes: https://code.google.com/p/dart/issues/detail?id=8015
7 years, 11 months ago (2013-01-22 15:34:14 UTC) #1
kasperl
LGTM. https://codereview.chromium.org/12051013/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): https://codereview.chromium.org/12051013/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart#newcode2626 sdk/lib/_internal/compiler/implementation/ssa/builder.dart:2626: instruction = new HIs(type, <HInstruction>[expression]..addAll(checks)); Not sure the ...
7 years, 11 months ago (2013-01-23 07:06:21 UTC) #2
ngeoffray
Thanks Kasper, let me know if you disagree with my replies. https://codereview.chromium.org/12051013/diff/1/sdk/lib/_internal/compiler/implementation/ssa/builder.dart File sdk/lib/_internal/compiler/implementation/ssa/builder.dart (right): ...
7 years, 11 months ago (2013-01-23 09:23:01 UTC) #3
kasperl
7 years, 11 months ago (2013-01-23 09:31:26 UTC) #4
https://codereview.chromium.org/12051013/diff/1/sdk/lib/_internal/compiler/im...
File sdk/lib/_internal/compiler/implementation/ssa/nodes.dart (right):

https://codereview.chromium.org/12051013/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:1524:
{this._isStatement: false})
On 2013/01/23 09:23:01, ngeoffray wrote:
> On 2013/01/23 07:06:21, kasperl wrote:
> > Is this really supposed to be a named, yet private parameter? Weird.
Wouldn't
> it
> > be cleaner to have an internal constructor that takes a mandatory
> > this._isStatement parameter and use that internal constructor from the two
> other
> > constructors?
> 
> For statically resolved methods, I prefer putting boolean parameters into
named
> parameters, instead of having these true/false all around. For this class, the
> _isStatement field does not have to be more private than the foreignType
field,
> so I removed the privacy. Is that OK with you?

Yes!

https://codereview.chromium.org/12051013/diff/1/sdk/lib/_internal/compiler/im...
sdk/lib/_internal/compiler/implementation/ssa/nodes.dart:2099: :
super(<HInstruction>[receiver]) {
On 2013/01/23 09:23:01, ngeoffray wrote:
> On 2013/01/23 07:06:21, kasperl wrote:
> > It's almost like having a constructor on HInstruction that clears side
effects
> > and enables GVN would be useful. Then you could use:
> > 
> >     : super.noSideEffects(...)
> > 
> > but you should probably only do it if it's used in enough places.
> 
> There are two HInstructions that would benefit from this constructor. My
> preference would be to keep the assignment of flags local to make it
consistent.

Sounds good!

Powered by Google App Engine
This is Rietveld 408576698