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 #ifndef V8_REGISTER_ALLOCATOR_VERIFIER_H_ | 5 #ifndef V8_REGISTER_ALLOCATOR_VERIFIER_H_ |
6 #define V8_REGISTER_ALLOCATOR_VERIFIER_H_ | 6 #define V8_REGISTER_ALLOCATOR_VERIFIER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 #include "src/zone-containers.h" | 9 #include "src/zone-containers.h" |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 int value_; // subkind index when relevant | 42 int value_; // subkind index when relevant |
43 int virtual_register_; | 43 int virtual_register_; |
44 }; | 44 }; |
45 | 45 |
46 struct InstructionConstraint { | 46 struct InstructionConstraint { |
47 const Instruction* instruction_; | 47 const Instruction* instruction_; |
48 size_t operand_constaints_size_; | 48 size_t operand_constaints_size_; |
49 OperandConstraint* operand_constraints_; | 49 OperandConstraint* operand_constraints_; |
50 }; | 50 }; |
51 | 51 |
52 class OutgoingMapping; | 52 class BlockMaps; |
53 | 53 |
54 typedef ZoneVector<InstructionConstraint> Constraints; | 54 typedef ZoneVector<InstructionConstraint> Constraints; |
55 typedef ZoneVector<OutgoingMapping*> OutgoingMappings; | |
56 | 55 |
57 Zone* zone() const { return zone_; } | 56 Zone* zone() const { return zone_; } |
58 const RegisterConfiguration* config() { return config_; } | 57 const RegisterConfiguration* config() { return config_; } |
59 const InstructionSequence* sequence() const { return sequence_; } | 58 const InstructionSequence* sequence() const { return sequence_; } |
60 Constraints* constraints() { return &constraints_; } | 59 Constraints* constraints() { return &constraints_; } |
61 | 60 |
62 static void VerifyInput(const OperandConstraint& constraint); | 61 static void VerifyInput(const OperandConstraint& constraint); |
63 static void VerifyTemp(const OperandConstraint& constraint); | 62 static void VerifyTemp(const OperandConstraint& constraint); |
64 static void VerifyOutput(const OperandConstraint& constraint); | 63 static void VerifyOutput(const OperandConstraint& constraint); |
65 | 64 |
66 void BuildConstraint(const InstructionOperand* op, | 65 void BuildConstraint(const InstructionOperand* op, |
67 OperandConstraint* constraint); | 66 OperandConstraint* constraint); |
68 void CheckConstraint(const InstructionOperand* op, | 67 void CheckConstraint(const InstructionOperand* op, |
69 const OperandConstraint* constraint); | 68 const OperandConstraint* constraint); |
70 | 69 |
71 void ConstructOutgoingMappings(OutgoingMappings* outgoing_mappings, | 70 void VerifyGapMoves(BlockMaps* outgoing_mappings, bool initial_pass); |
72 bool initial_pass); | |
73 | 71 |
74 Zone* const zone_; | 72 Zone* const zone_; |
75 const RegisterConfiguration* config_; | 73 const RegisterConfiguration* config_; |
76 const InstructionSequence* const sequence_; | 74 const InstructionSequence* const sequence_; |
77 Constraints constraints_; | 75 Constraints constraints_; |
78 | 76 |
79 DISALLOW_COPY_AND_ASSIGN(RegisterAllocatorVerifier); | 77 DISALLOW_COPY_AND_ASSIGN(RegisterAllocatorVerifier); |
80 }; | 78 }; |
81 | 79 |
82 } // namespace compiler | 80 } // namespace compiler |
83 } // namespace internal | 81 } // namespace internal |
84 } // namespace v8 | 82 } // namespace v8 |
85 | 83 |
86 #endif | 84 #endif |
OLD | NEW |