Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Replace a set of Hydrogen instructions with rotate instructions on ARM (issue 10984057)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
erik.co...@gmail.com  
View profile  
 More options Sep 27 2012, 10:45 am
From: erik.co...@gmail.com
Date: Thu, 27 Sep 2012 14:45:44 +0000
Local: Thurs, Sep 27 2012 10:45 am
Subject: Replace a set of Hydrogen instructions with rotate instructions on ARM (issue 10984057)

http://codereview.chromium.org/10984057/diff/1/src/arm/simulator-arm.cc
File src/arm/simulator-arm.cc (right):

http://codereview.chromium.org/10984057/diff/1/src/arm/simulator-arm....
src/arm/simulator-arm.cc:1504: int32_t left = result >> shift_amount;
How does this work with a negative input?

http://codereview.chromium.org/10984057/diff/1/src/hydrogen-instructi...
File src/hydrogen-instructions.cc (right):

http://codereview.chromium.org/10984057/diff/1/src/hydrogen-instructi...
src/hydrogen-instructions.cc:1624: : new(zone) Range();
Don't you have to Ror the result here?

http://codereview.chromium.org/10984057/diff/1/src/hydrogen-instructi...
File src/hydrogen-instructions.h (right):

http://codereview.chromium.org/10984057/diff/1/src/hydrogen-instructi...
src/hydrogen-instructions.h:3638:
ChangeRepresentation(Representation::Integer32());
Why is HRor different from all other bit ops here?

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1043: !shl->representation().IsInteger32())
Missing {}

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1052: if (!shr->right()->IsSub()) return false;
This function needs a comment explaining what it is looking for, and the
line above here needs an explanation of why only a sub function is OK
here.

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1062: if (sub->right()->OperandAt(0) !=
shl->right()->OperandAt(0))
Missing {}

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1083: bool HGraph::TryRotateRight(HInstruction* instr) {
There is a lot of copied code here - can they be combined into one
function with a flag?

http://codereview.chromium.org/10984057/diff/1/src/token.h
File src/token.h (right):

http://codereview.chromium.org/10984057/diff/1/src/token.h#newcode102
src/token.h:102: T(ROR, "rotate right", 11)
               \
This needs a comment to explain that it is only used in Crankshaft.

http://codereview.chromium.org/10984057/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
u...@chromium.org  
View profile  
 More options Sep 27 2012, 10:55 am
From: u...@chromium.org
Date: Thu, 27 Sep 2012 14:55:30 +0000
Local: Thurs, Sep 27 2012 10:55 am
Subject: Re: Replace a set of Hydrogen instructions with rotate instructions on ARM (issue 10984057)

http://codereview.chromium.org/10984057/diff/1/src/arm/simulator-arm.cc
File src/arm/simulator-arm.cc (right):

http://codereview.chromium.org/10984057/diff/1/src/arm/simulator-arm....
src/arm/simulator-arm.cc:1507: *carry_out = false;
The carry_out should contain the last shifted bit according to the spec.

http://codereview.chromium.org/10984057/diff/1/src/arm/simulator-arm....
src/arm/simulator-arm.cc:1511:
We can remove this empty line.

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1041: if (shl->UseCount()>1 || shr->UseCount()>1) return
false;
Please add space before and after each ">" operator.

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:1089: if (bor->left()->IsShl() && bor->right()->IsShr())
{
Please add space before and after each ">" operator.

http://codereview.chromium.org/10984057/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
u...@chromium.org  
View profile  
 More options Sep 27 2012, 11:30 am
From: u...@chromium.org
Date: Thu, 27 Sep 2012 15:30:10 +0000
Local: Thurs, Sep 27 2012 11:30 am
Subject: Re: Replace a set of Hydrogen instructions with rotate instructions on ARM (issue 10984057)

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc
File src/hydrogen.cc (right):

http://codereview.chromium.org/10984057/diff/1/src/hydrogen.cc#newcod...
src/hydrogen.cc:3539: #if defined(V8_TARGET_ARCH_ARM)
I am concerned with this ifdef. Hydrogen should contain platform
independent code and these kind of optimizations should be done on the
Lithium level.

http://codereview.chromium.org/10984057/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mstarzin...@chromium.org  
View profile  
 More options Sep 27 2012, 7:53 pm
From: mstarzin...@chromium.org
Date: Thu, 27 Sep 2012 23:53:27 +0000
Local: Thurs, Sep 27 2012 7:53 pm
Subject: Re: Replace a set of Hydrogen instructions with rotate instructions on ARM (issue 10984057)
Some general high-level observations about this change:

1) This is a very specialized optimization targeting one specific  
instruction
(i.e. rotation). I think a more general approach that performs general  
pattern
matching might scale better and cover other peephole optimizations as well  
(e.g.
scaled array access, algebraic simplification or other strength reductions)

2) Is this a common pattern in JavaScript applications or is this tracked  
by any
benchmark? I would be interested to know what particular use case this
optimization targets.

3) Adding a token for something that has no equivalent in JavaScript seems
wrong. We only do this in rare cases where we need to push information about
variable initialization through the AST, but not for Crankshaft  
optimizations.

4) This change definitely needs better test coverage.

https://chromiumcodereview.appspot.com/10984057/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »