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

Issue 10533053: Implement inlined version of binary arithmetic operations for doubles. (Closed)

Created:
8 years, 6 months ago by Vyacheslav Egorov (Google)
Modified:
8 years, 6 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement inlined version of binary arithmetic operations for doubles. No attempt to reuse temporary boxes or locally propagate types is done. BUG= TEST= Committed: https://code.google.com/p/dart/source/detail?r=8433

Patch Set 1 #

Total comments: 15
Unified diffs Side-by-side diffs Delta from patch set Stats (+167 lines, -44 lines) Patch
M runtime/vm/assembler_x64.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/assembler_x64.cc View 1 chunk +12 lines, -0 lines 2 comments Download
M runtime/vm/flow_graph_compiler_x64.h View 2 chunks +6 lines, -6 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 3 chunks +36 lines, -3 lines 2 comments Download
M runtime/vm/intermediate_language.h View 3 chunks +12 lines, -1 line 3 comments Download
M runtime/vm/intermediate_language_x64.cc View 4 chunks +100 lines, -34 lines 8 comments Download

Messages

Total messages: 5 (0 generated)
Vyacheslav Egorov (Google)
8 years, 6 months ago (2012-06-07 21:01:06 UTC) #1
srdjan
LGTM with comments https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/assembler_x64.cc File runtime/vm/assembler_x64.cc (right): https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/assembler_x64.cc#newcode560 runtime/vm/assembler_x64.cc:560: EmitOperand(dst, operand); Please add a test ...
8 years, 6 months ago (2012-06-08 05:18:22 UTC) #2
Mads Ager (google)
DBC :-) https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/intermediate_language_x64.cc File runtime/vm/intermediate_language_x64.cc (right): https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/intermediate_language_x64.cc#newcode884 runtime/vm/intermediate_language_x64.cc:884: return; Why 'return' here and 'break' below? ...
8 years, 6 months ago (2012-06-08 09:15:53 UTC) #3
Vyacheslav Egorov (Google)
Thanks for the review, landing. https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/assembler_x64.cc File runtime/vm/assembler_x64.cc (right): https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/assembler_x64.cc#newcode560 runtime/vm/assembler_x64.cc:560: EmitOperand(dst, operand); On 2012/06/08 ...
8 years, 6 months ago (2012-06-08 11:11:13 UTC) #4
srdjan
8 years, 6 months ago (2012-06-08 16:05:55 UTC) #5
https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/intermediat...
File runtime/vm/intermediate_language.h (right):

https://chromiumcodereview.appspot.com/10533053/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language.h:1331: const OperandsType operands_type_;
On 2012/06/08 11:11:13, Vyacheslav Egorov (Google) wrote:
> On 2012/06/08 05:18:22, srdjan wrote:
> > This works for now, but in Dart it is quite frequent that we have to support
a
> > mix of double and int types (result is always double). Sometimes it is a mix
> > Smi/Smi and Smi/Double.. maybe that can be handled by additional
> OperandsTypes?
> 
> We will have to decide how we want to implement them. For example V8 decision
> was that binary arithmetic operation always has a single type and inputs are
> coerced explicitly in the IR:
> 
> d1 = <...> ; real double
> d2 = Change i to d i4 ; int operand was coerced to double
> d3 = mul-d d1, d2
> 
> The benefit of handling conversions outside of the op is that you can optimize
> away redundancies and select single representation for loop phies which is
very
> important for performance of tight loops.

Sounds good.

Powered by Google App Engine
This is Rietveld 408576698