On 2015/09/13 12:10:03, dougc wrote:
On 2015/04/20 12:20:40, titzer wrote:
>

https://codereview.chromium.org/1095063002/diff/1/src/compiler/js-typed-lowering.cc
> File src/compiler/js-typed-lowering.cc (right):
>
>

https://codereview.chromium.org/1095063002/diff/1/src/compiler/js-typed-lowering.cc#newcode373
> src/compiler/js-typed-lowering.cc:373: Reduction
> JSTypedLowering::ReduceBitwiseAnd(Node* node) {
> I think you want to move this optimization to machine-operator-reducer. That
> will make it more general and also avoid the problem you see below.

Tried this suggestion, moving this to machine-operator-reducer. It works in part, but there are some issues that suggest this is too later to make use of
this type information.

For example, for one error there is a bit-and operation being used that
appears
to be testing the low bit of a value that is the result of converting true or false to a number, which I presume is checking for a tagged number. The type information gives the input as having the range 0 to 1, so bit-and-ing this input with 1 is redundant and is eliminated. But the bit-and is being applied
to
a lower level representation, to a tagged number, which is not the value that the type information applies to and this generates bad code. Does this sound right? Does it suggest another appropriate phase to perform transforms that depend on type information? Or should the transform be guarding against being
applied to possibly tagger values?

Ah, yes. The range information is in terms of "semantic integer ranges" and not in terms of raw machine ranges. So the and's with 1 that you are seeing are tag checks. We will have to know the correct representation for this optimization to
make sense.



https://codereview.chromium.org/1095063002/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to