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

Issue 10693028: Avoid generating '>>> 0' for bitops for which the result is only (Closed)

Created:
8 years, 5 months ago by Mads Ager (google)
Modified:
8 years, 5 months ago
Reviewers:
floitsch
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Avoid generating '>>> 0' for bitops for which the result is only used as input to other bitops. Additionally, recognize HBitAnd with constants that will always produce positive results. R=floitsch@google.com BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=9234

Patch Set 1 #

Patch Set 2 : Change name of helper #

Total comments: 2

Patch Set 3 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -2 lines) Patch
M lib/compiler/implementation/ssa/codegen.dart View 1 2 3 chunks +33 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (google)
8 years, 5 months ago (2012-06-28 17:37:20 UTC) #1
floitsch
LGTM! https://chromiumcodereview.appspot.com/10693028/diff/3001/lib/compiler/implementation/ssa/codegen.dart File lib/compiler/implementation/ssa/codegen.dart (right): https://chromiumcodereview.appspot.com/10693028/diff/3001/lib/compiler/implementation/ssa/codegen.dart#newcode204 lib/compiler/implementation/ssa/codegen.dart:204: if (value >= 0 && value < Math.pow(2, ...
8 years, 5 months ago (2012-06-28 22:57:18 UTC) #2
Mads Ager (google)
8 years, 5 months ago (2012-06-29 00:03:23 UTC) #3
https://chromiumcodereview.appspot.com/10693028/diff/3001/lib/compiler/implem...
File lib/compiler/implementation/ssa/codegen.dart (right):

https://chromiumcodereview.appspot.com/10693028/diff/3001/lib/compiler/implem...
lib/compiler/implementation/ssa/codegen.dart:204: if (value >= 0 && value <
Math.pow(2, 31)) {
On 2012/06/28 22:57:18, floitsch wrote:
> (1 << 31) would be a compile time constant. Math.pow isn't.
> Not a strong preference, though.

Done.

Powered by Google App Engine
This is Rietveld 408576698