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

Side by Side Diff: src/compiler/machine-graph-verifier.cc

Issue 2799863002: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor (Closed)
Patch Set: [Atomics] use TFJ builtins for atomic add, sub, and, or, and xor Created 3 years, 8 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 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 representation_vector_[node->id()] = 141 representation_vector_[node->id()] =
142 MachineRepresentation::kTagged; 142 MachineRepresentation::kTagged;
143 } 143 }
144 break; 144 break;
145 } 145 }
146 case IrOpcode::kAtomicStore: 146 case IrOpcode::kAtomicStore:
147 representation_vector_[node->id()] = 147 representation_vector_[node->id()] =
148 PromoteRepresentation(AtomicStoreRepresentationOf(node->op())); 148 PromoteRepresentation(AtomicStoreRepresentationOf(node->op()));
149 break; 149 break;
150 case IrOpcode::kAtomicExchange: 150 case IrOpcode::kAtomicExchange:
151 case IrOpcode::kAtomicCompareExchange:
152 case IrOpcode::kAtomicAdd:
153 case IrOpcode::kAtomicSub:
154 case IrOpcode::kAtomicAnd:
155 case IrOpcode::kAtomicOr:
156 case IrOpcode::kAtomicXor:
151 representation_vector_[node->id()] = PromoteRepresentation( 157 representation_vector_[node->id()] = PromoteRepresentation(
152 AtomicExchangeRepresentationOf(node->op()).representation()); 158 AtomicOpRepresentationOf(node->op()).representation());
153 break;
154 case IrOpcode::kAtomicCompareExchange:
155 representation_vector_[node->id()] = PromoteRepresentation(
156 AtomicCompareExchangeRepresentationOf(node->op())
157 .representation());
158 break; 159 break;
159 case IrOpcode::kStore: 160 case IrOpcode::kStore:
160 case IrOpcode::kProtectedStore: 161 case IrOpcode::kProtectedStore:
161 representation_vector_[node->id()] = PromoteRepresentation( 162 representation_vector_[node->id()] = PromoteRepresentation(
162 StoreRepresentationOf(node->op()).representation()); 163 StoreRepresentationOf(node->op()).representation());
163 break; 164 break;
164 case IrOpcode::kCheckedStore: 165 case IrOpcode::kCheckedStore:
165 representation_vector_[node->id()] = 166 representation_vector_[node->id()] =
166 PromoteRepresentation(CheckedStoreRepresentationOf(node->op())); 167 PromoteRepresentation(CheckedStoreRepresentationOf(node->op()));
167 break; 168 break;
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 break; 445 break;
445 case IrOpcode::kLoad: 446 case IrOpcode::kLoad:
446 case IrOpcode::kAtomicLoad: 447 case IrOpcode::kAtomicLoad:
447 CheckValueInputIsTaggedOrPointer(node, 0); 448 CheckValueInputIsTaggedOrPointer(node, 0);
448 CheckValueInputRepresentationIs( 449 CheckValueInputRepresentationIs(
449 node, 1, MachineType::PointerRepresentation()); 450 node, 1, MachineType::PointerRepresentation());
450 break; 451 break;
451 case IrOpcode::kStore: 452 case IrOpcode::kStore:
452 case IrOpcode::kAtomicStore: 453 case IrOpcode::kAtomicStore:
453 case IrOpcode::kAtomicExchange: 454 case IrOpcode::kAtomicExchange:
455 case IrOpcode::kAtomicAdd:
456 case IrOpcode::kAtomicSub:
457 case IrOpcode::kAtomicAnd:
458 case IrOpcode::kAtomicOr:
459 case IrOpcode::kAtomicXor:
454 CheckValueInputIsTaggedOrPointer(node, 0); 460 CheckValueInputIsTaggedOrPointer(node, 0);
455 CheckValueInputRepresentationIs( 461 CheckValueInputRepresentationIs(
456 node, 1, MachineType::PointerRepresentation()); 462 node, 1, MachineType::PointerRepresentation());
457 switch (inferrer_->GetRepresentation(node)) { 463 switch (inferrer_->GetRepresentation(node)) {
458 case MachineRepresentation::kTagged: 464 case MachineRepresentation::kTagged:
459 case MachineRepresentation::kTaggedPointer: 465 case MachineRepresentation::kTaggedPointer:
460 case MachineRepresentation::kTaggedSigned: 466 case MachineRepresentation::kTaggedSigned:
461 CheckValueInputIsTagged(node, 2); 467 CheckValueInputIsTagged(node, 2);
462 break; 468 break;
463 default: 469 default:
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 MachineRepresentationInferrer representation_inferrer(schedule, graph, 831 MachineRepresentationInferrer representation_inferrer(schedule, graph,
826 linkage, temp_zone); 832 linkage, temp_zone);
827 MachineRepresentationChecker checker(schedule, &representation_inferrer, 833 MachineRepresentationChecker checker(schedule, &representation_inferrer,
828 is_stub, name); 834 is_stub, name);
829 checker.Run(); 835 checker.Run();
830 } 836 }
831 837
832 } // namespace compiler 838 } // namespace compiler
833 } // namespace internal 839 } // namespace internal
834 } // namespace v8 840 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698