| OLD | NEW |
| 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/instruction-selector-impl.h" | 5 #include "src/compiler/instruction-selector-impl.h" |
| 6 #include "src/compiler/node-matchers.h" | 6 #include "src/compiler/node-matchers.h" |
| 7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
| 8 | 8 |
| 9 namespace v8 { | 9 namespace v8 { |
| 10 namespace internal { | 10 namespace internal { |
| (...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1825 return VisitFloat64Compare(this, value, &cont); | 1825 return VisitFloat64Compare(this, value, &cont); |
| 1826 case IrOpcode::kFloat64LessThanOrEqual: | 1826 case IrOpcode::kFloat64LessThanOrEqual: |
| 1827 cont.OverwriteAndNegateIfEqual(kFloatLessThanOrEqual); | 1827 cont.OverwriteAndNegateIfEqual(kFloatLessThanOrEqual); |
| 1828 return VisitFloat64Compare(this, value, &cont); | 1828 return VisitFloat64Compare(this, value, &cont); |
| 1829 case IrOpcode::kProjection: | 1829 case IrOpcode::kProjection: |
| 1830 // Check if this is the overflow output projection of an | 1830 // Check if this is the overflow output projection of an |
| 1831 // <Operation>WithOverflow node. | 1831 // <Operation>WithOverflow node. |
| 1832 if (ProjectionIndexOf(value->op()) == 1u) { | 1832 if (ProjectionIndexOf(value->op()) == 1u) { |
| 1833 // We cannot combine the <Operation>WithOverflow with this branch | 1833 // We cannot combine the <Operation>WithOverflow with this branch |
| 1834 // unless the 0th projection (the use of the actual value of the | 1834 // unless the 0th projection (the use of the actual value of the |
| 1835 // <Operation> is either NULL, which means there's no use of the | 1835 // <Operation> is either nullptr, which means there's no use of the |
| 1836 // actual value, or was already defined, which means it is scheduled | 1836 // actual value, or was already defined, which means it is scheduled |
| 1837 // *AFTER* this branch). | 1837 // *AFTER* this branch). |
| 1838 Node* const node = value->InputAt(0); | 1838 Node* const node = value->InputAt(0); |
| 1839 Node* const result = NodeProperties::FindProjection(node, 0); | 1839 Node* const result = NodeProperties::FindProjection(node, 0); |
| 1840 if (result == NULL || IsDefined(result)) { | 1840 if (result == nullptr || IsDefined(result)) { |
| 1841 switch (node->opcode()) { | 1841 switch (node->opcode()) { |
| 1842 case IrOpcode::kInt32AddWithOverflow: | 1842 case IrOpcode::kInt32AddWithOverflow: |
| 1843 cont.OverwriteAndNegateIfEqual(kOverflow); | 1843 cont.OverwriteAndNegateIfEqual(kOverflow); |
| 1844 return VisitBinop<Int32BinopMatcher>(this, node, kArm64Add32, | 1844 return VisitBinop<Int32BinopMatcher>(this, node, kArm64Add32, |
| 1845 kArithmeticImm, &cont); | 1845 kArithmeticImm, &cont); |
| 1846 case IrOpcode::kInt32SubWithOverflow: | 1846 case IrOpcode::kInt32SubWithOverflow: |
| 1847 cont.OverwriteAndNegateIfEqual(kOverflow); | 1847 cont.OverwriteAndNegateIfEqual(kOverflow); |
| 1848 return VisitBinop<Int32BinopMatcher>(this, node, kArm64Sub32, | 1848 return VisitBinop<Int32BinopMatcher>(this, node, kArm64Sub32, |
| 1849 kArithmeticImm, &cont); | 1849 kArithmeticImm, &cont); |
| 1850 case IrOpcode::kInt64AddWithOverflow: | 1850 case IrOpcode::kInt64AddWithOverflow: |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2190 MachineOperatorBuilder::kFloat32RoundTiesEven | | 2190 MachineOperatorBuilder::kFloat32RoundTiesEven | |
| 2191 MachineOperatorBuilder::kFloat64RoundTiesEven | | 2191 MachineOperatorBuilder::kFloat64RoundTiesEven | |
| 2192 MachineOperatorBuilder::kWord32ShiftIsSafe | | 2192 MachineOperatorBuilder::kWord32ShiftIsSafe | |
| 2193 MachineOperatorBuilder::kInt32DivIsSafe | | 2193 MachineOperatorBuilder::kInt32DivIsSafe | |
| 2194 MachineOperatorBuilder::kUint32DivIsSafe; | 2194 MachineOperatorBuilder::kUint32DivIsSafe; |
| 2195 } | 2195 } |
| 2196 | 2196 |
| 2197 } // namespace compiler | 2197 } // namespace compiler |
| 2198 } // namespace internal | 2198 } // namespace internal |
| 2199 } // namespace v8 | 2199 } // namespace v8 |
| OLD | NEW |