OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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-graph-verifier.h" | 5 #include "src/compiler/machine-graph-verifier.h" |
6 | 6 |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/graph.h" | 8 #include "src/compiler/graph.h" |
9 #include "src/compiler/linkage.h" | 9 #include "src/compiler/linkage.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 representation_vector_[node->id()] = | 142 representation_vector_[node->id()] = |
143 MachineRepresentation::kTagged; | 143 MachineRepresentation::kTagged; |
144 } | 144 } |
145 break; | 145 break; |
146 } | 146 } |
147 case IrOpcode::kAtomicStore: | 147 case IrOpcode::kAtomicStore: |
148 representation_vector_[node->id()] = | 148 representation_vector_[node->id()] = |
149 PromoteRepresentation(AtomicStoreRepresentationOf(node->op())); | 149 PromoteRepresentation(AtomicStoreRepresentationOf(node->op())); |
150 break; | 150 break; |
151 case IrOpcode::kAtomicExchange: | 151 case IrOpcode::kAtomicExchange: |
| 152 case IrOpcode::kAtomicCompareExchange: |
| 153 case IrOpcode::kAtomicAdd: |
| 154 case IrOpcode::kAtomicSub: |
| 155 case IrOpcode::kAtomicAnd: |
| 156 case IrOpcode::kAtomicOr: |
| 157 case IrOpcode::kAtomicXor: |
152 representation_vector_[node->id()] = PromoteRepresentation( | 158 representation_vector_[node->id()] = PromoteRepresentation( |
153 AtomicExchangeRepresentationOf(node->op()).representation()); | 159 AtomicOpRepresentationOf(node->op()).representation()); |
154 break; | |
155 case IrOpcode::kAtomicCompareExchange: | |
156 representation_vector_[node->id()] = PromoteRepresentation( | |
157 AtomicCompareExchangeRepresentationOf(node->op()) | |
158 .representation()); | |
159 break; | 160 break; |
160 case IrOpcode::kStore: | 161 case IrOpcode::kStore: |
161 case IrOpcode::kProtectedStore: | 162 case IrOpcode::kProtectedStore: |
162 representation_vector_[node->id()] = PromoteRepresentation( | 163 representation_vector_[node->id()] = PromoteRepresentation( |
163 StoreRepresentationOf(node->op()).representation()); | 164 StoreRepresentationOf(node->op()).representation()); |
164 break; | 165 break; |
165 case IrOpcode::kCheckedStore: | 166 case IrOpcode::kCheckedStore: |
166 representation_vector_[node->id()] = | 167 representation_vector_[node->id()] = |
167 PromoteRepresentation(CheckedStoreRepresentationOf(node->op())); | 168 PromoteRepresentation(CheckedStoreRepresentationOf(node->op())); |
168 break; | 169 break; |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 break; | 449 break; |
449 case IrOpcode::kLoad: | 450 case IrOpcode::kLoad: |
450 case IrOpcode::kAtomicLoad: | 451 case IrOpcode::kAtomicLoad: |
451 CheckValueInputIsTaggedOrPointer(node, 0); | 452 CheckValueInputIsTaggedOrPointer(node, 0); |
452 CheckValueInputRepresentationIs( | 453 CheckValueInputRepresentationIs( |
453 node, 1, MachineType::PointerRepresentation()); | 454 node, 1, MachineType::PointerRepresentation()); |
454 break; | 455 break; |
455 case IrOpcode::kStore: | 456 case IrOpcode::kStore: |
456 case IrOpcode::kAtomicStore: | 457 case IrOpcode::kAtomicStore: |
457 case IrOpcode::kAtomicExchange: | 458 case IrOpcode::kAtomicExchange: |
| 459 case IrOpcode::kAtomicAdd: |
| 460 case IrOpcode::kAtomicSub: |
| 461 case IrOpcode::kAtomicAnd: |
| 462 case IrOpcode::kAtomicOr: |
| 463 case IrOpcode::kAtomicXor: |
458 CheckValueInputIsTaggedOrPointer(node, 0); | 464 CheckValueInputIsTaggedOrPointer(node, 0); |
459 CheckValueInputRepresentationIs( | 465 CheckValueInputRepresentationIs( |
460 node, 1, MachineType::PointerRepresentation()); | 466 node, 1, MachineType::PointerRepresentation()); |
461 switch (inferrer_->GetRepresentation(node)) { | 467 switch (inferrer_->GetRepresentation(node)) { |
462 case MachineRepresentation::kTagged: | 468 case MachineRepresentation::kTagged: |
463 case MachineRepresentation::kTaggedPointer: | 469 case MachineRepresentation::kTaggedPointer: |
464 case MachineRepresentation::kTaggedSigned: | 470 case MachineRepresentation::kTaggedSigned: |
465 CheckValueInputIsTagged(node, 2); | 471 CheckValueInputIsTagged(node, 2); |
466 break; | 472 break; |
467 default: | 473 default: |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 MachineRepresentationInferrer representation_inferrer(schedule, graph, | 837 MachineRepresentationInferrer representation_inferrer(schedule, graph, |
832 linkage, temp_zone); | 838 linkage, temp_zone); |
833 MachineRepresentationChecker checker(schedule, &representation_inferrer, | 839 MachineRepresentationChecker checker(schedule, &representation_inferrer, |
834 is_stub, name); | 840 is_stub, name); |
835 checker.Run(); | 841 checker.Run(); |
836 } | 842 } |
837 | 843 |
838 } // namespace compiler | 844 } // namespace compiler |
839 } // namespace internal | 845 } // namespace internal |
840 } // namespace v8 | 846 } // namespace v8 |
OLD | NEW |