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/base/ieee754.h" | 9 #include "src/base/ieee754.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
808 (rep == MachineRepresentation::kWord16 && | 808 (rep == MachineRepresentation::kWord16 && |
809 m.right().IsInRange(1, 16)))) { | 809 m.right().IsInRange(1, 16)))) { |
810 Int32BinopMatcher mleft(m.left().node()); | 810 Int32BinopMatcher mleft(m.left().node()); |
811 if (mleft.right().Is(m.right().Value())) { | 811 if (mleft.right().Is(m.right().Value())) { |
812 node->ReplaceInput(value_input, mleft.left().node()); | 812 node->ReplaceInput(value_input, mleft.left().node()); |
813 return Changed(node); | 813 return Changed(node); |
814 } | 814 } |
815 } | 815 } |
816 break; | 816 break; |
817 } | 817 } |
818 // TODO(mvstanton): put kInt32MulWithOverflow here too, eh? | |
Benedikt Meurer
2016/07/12 04:09:28
Nope, that doesn't make sense. The rules for the s
mvstanton
2016/07/12 08:52:49
Done.
| |
818 default: | 819 default: |
819 break; | 820 break; |
820 } | 821 } |
821 return NoChange(); | 822 return NoChange(); |
822 } | 823 } |
823 | 824 |
824 | 825 |
825 Reduction MachineOperatorReducer::ReduceProjection(size_t index, Node* node) { | 826 Reduction MachineOperatorReducer::ReduceProjection(size_t index, Node* node) { |
826 switch (node->opcode()) { | 827 switch (node->opcode()) { |
827 case IrOpcode::kInt32AddWithOverflow: { | 828 case IrOpcode::kInt32AddWithOverflow: { |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1210 MachineOperatorBuilder* MachineOperatorReducer::machine() const { | 1211 MachineOperatorBuilder* MachineOperatorReducer::machine() const { |
1211 return jsgraph()->machine(); | 1212 return jsgraph()->machine(); |
1212 } | 1213 } |
1213 | 1214 |
1214 | 1215 |
1215 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } | 1216 Graph* MachineOperatorReducer::graph() const { return jsgraph()->graph(); } |
1216 | 1217 |
1217 } // namespace compiler | 1218 } // namespace compiler |
1218 } // namespace internal | 1219 } // namespace internal |
1219 } // namespace v8 | 1220 } // namespace v8 |
OLD | NEW |