| 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/machine-operator-reducer.h" | 5 #include "src/compiler/machine-operator-reducer.h" |
| 6 | 6 |
| 7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/base/division-by-constant.h" | 8 #include "src/base/division-by-constant.h" |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/compiler/diamond.h" | 10 #include "src/compiler/diamond.h" |
| (...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 common()->Phi(MachineRepresentation::kWord32, value_input_count)); | 671 common()->Phi(MachineRepresentation::kWord32, value_input_count)); |
| 672 return Replace(phi); | 672 return Replace(phi); |
| 673 } | 673 } |
| 674 } | 674 } |
| 675 return NoChange(); | 675 return NoChange(); |
| 676 } | 676 } |
| 677 | 677 |
| 678 | 678 |
| 679 Reduction MachineOperatorReducer::ReduceStore(Node* node) { | 679 Reduction MachineOperatorReducer::ReduceStore(Node* node) { |
| 680 MachineRepresentation const rep = | 680 MachineRepresentation const rep = |
| 681 StoreRepresentationOf(node->op()).machine_type().representation(); | 681 StoreRepresentationOf(node->op()).representation(); |
| 682 Node* const value = node->InputAt(2); | 682 Node* const value = node->InputAt(2); |
| 683 switch (value->opcode()) { | 683 switch (value->opcode()) { |
| 684 case IrOpcode::kWord32And: { | 684 case IrOpcode::kWord32And: { |
| 685 Uint32BinopMatcher m(value); | 685 Uint32BinopMatcher m(value); |
| 686 if (m.right().HasValue() && ((rep == MachineRepresentation::kWord8 && | 686 if (m.right().HasValue() && ((rep == MachineRepresentation::kWord8 && |
| 687 (m.right().Value() & 0xff) == 0xff) || | 687 (m.right().Value() & 0xff) == 0xff) || |
| 688 (rep == MachineRepresentation::kWord16 && | 688 (rep == MachineRepresentation::kWord16 && |
| 689 (m.right().Value() & 0xffff) == 0xffff))) { | 689 (m.right().Value() & 0xffff) == 0xffff))) { |
| 690 node->ReplaceInput(2, m.left().node()); | 690 node->ReplaceInput(2, m.left().node()); |
| 691 return Changed(node); | 691 return Changed(node); |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 MachineOperatorBuilder* MachineOperatorReducer::machine() const { | 1082 MachineOperatorBuilder* MachineOperatorReducer::machine() const { |
| 1083 return jsgraph()->machine(); | 1083 return jsgraph()->machine(); |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 | 1086 |
| 1087 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } | 1087 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } |
| 1088 | 1088 |
| 1089 } // namespace compiler | 1089 } // namespace compiler |
| 1090 } // namespace internal | 1090 } // namespace internal |
| 1091 } // namespace v8 | 1091 } // namespace v8 |
| OLD | NEW |