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

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

Issue 2623633003: [Atomics] Make Atomics.exchange a builtin using TF (Closed)
Patch Set: remove 0 extend for arm Created 3 years, 9 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 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 case IrOpcode::kParameter: 435 case IrOpcode::kParameter:
432 case IrOpcode::kProjection: 436 case IrOpcode::kProjection:
433 break; 437 break;
434 case IrOpcode::kLoad: 438 case IrOpcode::kLoad:
435 case IrOpcode::kAtomicLoad: 439 case IrOpcode::kAtomicLoad:
436 CheckValueInputIsTaggedOrPointer(node, 0); 440 CheckValueInputIsTaggedOrPointer(node, 0);
437 CheckValueInputRepresentationIs( 441 CheckValueInputRepresentationIs(
438 node, 1, MachineType::PointerRepresentation()); 442 node, 1, MachineType::PointerRepresentation());
439 break; 443 break;
440 case IrOpcode::kStore: 444 case IrOpcode::kStore:
445 case IrOpcode::kAtomicStore:
446 case IrOpcode::kAtomicExchange:
441 CheckValueInputIsTaggedOrPointer(node, 0); 447 CheckValueInputIsTaggedOrPointer(node, 0);
442 CheckValueInputRepresentationIs( 448 CheckValueInputRepresentationIs(
443 node, 1, MachineType::PointerRepresentation()); 449 node, 1, MachineType::PointerRepresentation());
444 switch (inferrer_->GetRepresentation(node)) {
445 case MachineRepresentation::kTagged:
446 case MachineRepresentation::kTaggedPointer:
447 case MachineRepresentation::kTaggedSigned:
448 CheckValueInputIsTagged(node, 2);
449 break;
450 default:
451 CheckValueInputRepresentationIs(
452 node, 2, inferrer_->GetRepresentation(node));
453 }
454 break;
455 case IrOpcode::kAtomicStore:
456 CheckValueInputIsTaggedOrPointer(node, 0);
457 CheckValueInputRepresentationIs(
458 node, 1, MachineType::PointerRepresentation());
459 switch (inferrer_->GetRepresentation(node)) { 450 switch (inferrer_->GetRepresentation(node)) {
460 case MachineRepresentation::kTagged: 451 case MachineRepresentation::kTagged:
461 case MachineRepresentation::kTaggedPointer: 452 case MachineRepresentation::kTaggedPointer:
462 case MachineRepresentation::kTaggedSigned: 453 case MachineRepresentation::kTaggedSigned:
463 CheckValueInputIsTagged(node, 2); 454 CheckValueInputIsTagged(node, 2);
464 break; 455 break;
465 default: 456 default:
466 CheckValueInputRepresentationIs( 457 CheckValueInputRepresentationIs(
467 node, 2, inferrer_->GetRepresentation(node)); 458 node, 2, inferrer_->GetRepresentation(node));
468 } 459 }
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 MachineRepresentationInferrer representation_inferrer(schedule, graph, 800 MachineRepresentationInferrer representation_inferrer(schedule, graph,
810 linkage, temp_zone); 801 linkage, temp_zone);
811 MachineRepresentationChecker checker(schedule, &representation_inferrer, 802 MachineRepresentationChecker checker(schedule, &representation_inferrer,
812 is_stub, name); 803 is_stub, name);
813 checker.Run(); 804 checker.Run();
814 } 805 }
815 806
816 } // namespace compiler 807 } // namespace compiler
817 } // namespace internal 808 } // namespace internal
818 } // namespace v8 809 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698