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

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

Issue 2623633003: [Atomics] Make Atomics.exchange a builtin using TF (Closed)
Patch Set: [Atomics] Make Atomics.exchange a builtin using TF Created 3 years, 11 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 } else { 141 } else {
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:
152 representation_vector_[node->id()] = PromoteRepresentation(
153 AtomicExchangeRepresentationOf(node->op()).representation());
154 break;
151 case IrOpcode::kStore: 155 case IrOpcode::kStore:
152 case IrOpcode::kProtectedStore: 156 case IrOpcode::kProtectedStore:
153 representation_vector_[node->id()] = PromoteRepresentation( 157 representation_vector_[node->id()] = PromoteRepresentation(
154 StoreRepresentationOf(node->op()).representation()); 158 StoreRepresentationOf(node->op()).representation());
155 break; 159 break;
156 case IrOpcode::kCheckedStore: 160 case IrOpcode::kCheckedStore:
157 representation_vector_[node->id()] = 161 representation_vector_[node->id()] =
158 PromoteRepresentation(CheckedStoreRepresentationOf(node->op())); 162 PromoteRepresentation(CheckedStoreRepresentationOf(node->op()));
159 break; 163 break;
160 case IrOpcode::kUnalignedStore: 164 case IrOpcode::kUnalignedStore:
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 case IrOpcode::kParameter: 431 case IrOpcode::kParameter:
428 case IrOpcode::kProjection: 432 case IrOpcode::kProjection:
429 break; 433 break;
430 case IrOpcode::kLoad: 434 case IrOpcode::kLoad:
431 case IrOpcode::kAtomicLoad: 435 case IrOpcode::kAtomicLoad:
432 CheckValueInputIsTaggedOrPointer(node, 0); 436 CheckValueInputIsTaggedOrPointer(node, 0);
433 CheckValueInputRepresentationIs( 437 CheckValueInputRepresentationIs(
434 node, 1, MachineType::PointerRepresentation()); 438 node, 1, MachineType::PointerRepresentation());
435 break; 439 break;
436 case IrOpcode::kStore: 440 case IrOpcode::kStore:
441 case IrOpcode::kAtomicStore:
442 case IrOpcode::kAtomicExchange:
437 CheckValueInputIsTaggedOrPointer(node, 0); 443 CheckValueInputIsTaggedOrPointer(node, 0);
438 CheckValueInputRepresentationIs( 444 CheckValueInputRepresentationIs(
439 node, 1, MachineType::PointerRepresentation()); 445 node, 1, MachineType::PointerRepresentation());
440 switch (inferrer_->GetRepresentation(node)) {
441 case MachineRepresentation::kTagged:
442 case MachineRepresentation::kTaggedPointer:
443 case MachineRepresentation::kTaggedSigned:
444 CheckValueInputIsTagged(node, 2);
445 break;
446 default:
447 CheckValueInputRepresentationIs(
448 node, 2, inferrer_->GetRepresentation(node));
449 }
450 break;
451 case IrOpcode::kAtomicStore:
452 CheckValueInputIsTaggedOrPointer(node, 0);
453 CheckValueInputRepresentationIs(
454 node, 1, MachineType::PointerRepresentation());
455 switch (inferrer_->GetRepresentation(node)) { 446 switch (inferrer_->GetRepresentation(node)) {
456 case MachineRepresentation::kTagged: 447 case MachineRepresentation::kTagged:
457 case MachineRepresentation::kTaggedPointer: 448 case MachineRepresentation::kTaggedPointer:
458 case MachineRepresentation::kTaggedSigned: 449 case MachineRepresentation::kTaggedSigned:
459 CheckValueInputIsTagged(node, 2); 450 CheckValueInputIsTagged(node, 2);
460 break; 451 break;
461 default: 452 default:
462 CheckValueInputRepresentationIs( 453 CheckValueInputRepresentationIs(
463 node, 2, inferrer_->GetRepresentation(node)); 454 node, 2, inferrer_->GetRepresentation(node));
464 } 455 }
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
801 MachineRepresentationInferrer representation_inferrer(schedule, graph, 792 MachineRepresentationInferrer representation_inferrer(schedule, graph,
802 linkage, temp_zone); 793 linkage, temp_zone);
803 MachineRepresentationChecker checker(schedule, &representation_inferrer, 794 MachineRepresentationChecker checker(schedule, &representation_inferrer,
804 is_stub, name); 795 is_stub, name);
805 checker.Run(); 796 checker.Run();
806 } 797 }
807 798
808 } // namespace compiler 799 } // namespace compiler
809 } // namespace internal 800 } // namespace internal
810 } // namespace v8 801 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698