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

Issue 5900001: Fix deoptimization from %_MathPow. Do not prepare the stack for a C... (Closed)

Created:
10 years ago by Mads Ager (chromium)
Modified:
9 years, 7 months ago
Reviewers:
William Hesse
CC:
v8-dev
Visibility:
Public.

Description

Fix deoptimization from %_MathPow. Do not prepare the stack for a C call and then bailout without performing the call. In order to not duplicate code, convert both heap number and smi to a double in an xmm register if possible. Then setup the stack and call the C function. BUG=http://code.google.com/p/v8/issues/detail?id=986 Committed: http://code.google.com/p/v8/source/detail?r=6032

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -16 lines) Patch
M src/execution.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/ia32/lithium-codegen-ia32.cc View 1 1 chunk +22 lines, -14 lines 2 comments Download
M src/ia32/lithium-ia32.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Mads Ager (chromium)
10 years ago (2010-12-15 14:05:09 UTC) #1
William Hesse
LGTM, except that we shouldn't lose the integer power optimization. If this is committed, we ...
10 years ago (2010-12-15 14:38:38 UTC) #2
Mads Ager (chromium)
10 years ago (2010-12-15 14:43:20 UTC) #3
http://codereview.chromium.org/5900001/diff/5001/src/ia32/lithium-codegen-ia3...
File src/ia32/lithium-codegen-ia32.cc (right):

http://codereview.chromium.org/5900001/diff/5001/src/ia32/lithium-codegen-ia3...
src/ia32/lithium-codegen-ia32.cc:2285: __ jmp(&call);
On 2010/12/15 14:38:38, William Hesse wrote:
> Calling power_double_double rather than power_double_int here loses the
> optimization for integer powers, which is much faster in many cases.  Integer
> powers use multiplication and squaring, and double powers use log and exp.

Good point. I'll check performance. I didn't notice that two different functions
were called here. Thanks!

Powered by Google App Engine
This is Rietveld 408576698