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

Issue 2868028: Port optimization of comparison with a trivial LHS from ia32 to x64. (Closed)

Created:
10 years, 6 months ago by William Hesse
Modified:
9 years, 7 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev
Visibility:
Public.

Description

Port optimization of comparison with a trivial LHS from ia32 to x64. Committed: http://code.google.com/p/v8/source/detail?r=4943

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -2 lines) Patch
M src/x64/codegen-x64.cc View 1 1 chunk +11 lines, -2 lines 5 comments Download

Messages

Total messages: 5 (0 generated)
William Hesse
10 years, 6 months ago (2010-06-23 13:19:48 UTC) #1
William Hesse
10 years, 6 months ago (2010-06-24 08:10:04 UTC) #2
Lasse Reichstein
LGTM. Does it apply in more cases? E.g. GenerateMathPow where one of the operands is ...
10 years, 6 months ago (2010-06-24 08:59:48 UTC) #3
Lasse Reichstein
Ignore the comment on GenerateMathPow - it's only called from our Math.prototype.pow function with variables ...
10 years, 6 months ago (2010-06-24 09:00:41 UTC) #4
William Hesse
10 years, 6 months ago (2010-06-24 14:43:53 UTC) #5
http://codereview.chromium.org/2868028/diff/3001/4001
File src/x64/codegen-x64.cc (right):

http://codereview.chromium.org/2868028/diff/3001/4001#newcode3839
src/x64/codegen-x64.cc:3839: Load(right);
On 2010/06/24 08:59:48, Lasse Reichstein wrote:
> The optimization is likely to apply here too, because left is almost certainly
a
> literal string.

But since we are going to a builtin, it will be spilled anyway.

http://codereview.chromium.org/2868028/diff/3001/4001#newcode3863
src/x64/codegen-x64.cc:3863: frame_->Push(&right_result);
On 2010/06/24 08:59:48, Lasse Reichstein wrote:
> Could we reverse the comparison instead, and keep left on top of the stack?
> 
I don't think so, because the ToNumber calls inside comparison have to happen in
a certain order.
>

Powered by Google App Engine
This is Rietveld 408576698