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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 2184513003: [turbofan] Adds handling of number or oddball type feedback to SpeculativeNumberShiftLeft. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1649 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 VisitBinop(node, UseInfo::TruncatingWord32(), 1660 VisitBinop(node, UseInfo::TruncatingWord32(),
1661 UseInfo::TruncatingWord32(), 1661 UseInfo::TruncatingWord32(),
1662 MachineRepresentation::kWord32); 1662 MachineRepresentation::kWord32);
1663 if (lower()) { 1663 if (lower()) {
1664 lowering->DoShift(node, lowering->machine()->Word32Shl(), rhs_type); 1664 lowering->DoShift(node, lowering->machine()->Word32Shl(), rhs_type);
1665 } 1665 }
1666 return; 1666 return;
1667 } 1667 }
1668 BinaryOperationHints::Hint hint = BinaryOperationHintOf(node->op()); 1668 BinaryOperationHints::Hint hint = BinaryOperationHintOf(node->op());
1669 if (hint == BinaryOperationHints::kSignedSmall || 1669 if (hint == BinaryOperationHints::kSignedSmall ||
1670 hint == BinaryOperationHints::kSigned32) { 1670 hint == BinaryOperationHints::kSigned32 ||
Benedikt Meurer 2016/07/27 03:34:36 This if is redundant. Drop it completely, or phras
Jarin 2016/07/27 05:34:01 +1 for the DCHECK.
epertoso 2016/07/27 08:26:36 As per offline discussion, I'll just remove this.
1671 hint == BinaryOperationHints::kNumberOrOddball) {
1671 Type* rhs_type = GetUpperBound(node->InputAt(1)); 1672 Type* rhs_type = GetUpperBound(node->InputAt(1));
1672 if (truncation.IsUsedAsWord32()) { 1673 VisitBinop(node, hint == BinaryOperationHints::kNumberOrOddball
1673 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), 1674 ? UseInfo::CheckedNumberOrOddballAsWord32()
1674 MachineRepresentation::kWord32); 1675 : UseInfo::CheckedSigned32AsWord32(),
1675 if (lower()) { 1676 MachineRepresentation::kWord32, Type::Signed32());
1676 lowering->DoShift(node, lowering->machine()->Word32Shl(), 1677 if (lower()) {
1677 rhs_type); 1678 lowering->DoShift(node, lowering->machine()->Word32Shl(), rhs_type);
1678 }
1679 } else {
1680 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(),
1681 MachineRepresentation::kWord32, Type::Signed32());
1682 if (lower()) {
1683 lowering->DoShift(node, lowering->machine()->Word32Shl(),
1684 rhs_type);
1685 }
1686 } 1679 }
1687 return; 1680 return;
1688 } 1681 }
1689 UNREACHABLE(); 1682 UNREACHABLE();
1690 } 1683 }
1691 case IrOpcode::kNumberShiftRight: { 1684 case IrOpcode::kNumberShiftRight: {
1692 Type* rhs_type = GetUpperBound(node->InputAt(1)); 1685 Type* rhs_type = GetUpperBound(node->InputAt(1));
1693 VisitBinop(node, UseInfo::TruncatingWord32(), 1686 VisitBinop(node, UseInfo::TruncatingWord32(),
1694 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32); 1687 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32);
1695 if (lower()) { 1688 if (lower()) {
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
3504 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3497 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3505 Operator::kNoProperties); 3498 Operator::kNoProperties);
3506 to_number_operator_.set(common()->Call(desc)); 3499 to_number_operator_.set(common()->Call(desc));
3507 } 3500 }
3508 return to_number_operator_.get(); 3501 return to_number_operator_.get();
3509 } 3502 }
3510 3503
3511 } // namespace compiler 3504 } // namespace compiler
3512 } // namespace internal 3505 } // namespace internal
3513 } // namespace v8 3506 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698