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_H_ | 5 #ifndef V8_REGISTER_ALLOCATOR_H_ |
6 #define V8_REGISTER_ALLOCATOR_H_ | 6 #define V8_REGISTER_ALLOCATOR_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/compiler/instruction.h" | 9 #include "src/compiler/instruction.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 // Liveness analysis support. | 384 // Liveness analysis support. |
385 void InitializeLivenessAnalysis(); | 385 void InitializeLivenessAnalysis(); |
386 BitVector* ComputeLiveOut(BasicBlock* block); | 386 BitVector* ComputeLiveOut(BasicBlock* block); |
387 void AddInitialIntervals(BasicBlock* block, BitVector* live_out); | 387 void AddInitialIntervals(BasicBlock* block, BitVector* live_out); |
388 bool IsOutputRegisterOf(Instruction* instr, int index); | 388 bool IsOutputRegisterOf(Instruction* instr, int index); |
389 bool IsOutputDoubleRegisterOf(Instruction* instr, int index); | 389 bool IsOutputDoubleRegisterOf(Instruction* instr, int index); |
390 void ProcessInstructions(BasicBlock* block, BitVector* live); | 390 void ProcessInstructions(BasicBlock* block, BitVector* live); |
391 void MeetRegisterConstraints(BasicBlock* block); | 391 void MeetRegisterConstraints(BasicBlock* block); |
392 void MeetConstraintsBetween(Instruction* first, Instruction* second, | 392 void MeetConstraintsBetween(Instruction* first, Instruction* second, |
393 int gap_index); | 393 int gap_index); |
| 394 void MeetRegisterConstraintsForLastInstructionInBlock(BasicBlock* block); |
394 void ResolvePhis(BasicBlock* block); | 395 void ResolvePhis(BasicBlock* block); |
395 | 396 |
396 // Helper methods for building intervals. | 397 // Helper methods for building intervals. |
397 InstructionOperand* AllocateFixed(UnallocatedOperand* operand, int pos, | 398 InstructionOperand* AllocateFixed(UnallocatedOperand* operand, int pos, |
398 bool is_tagged); | 399 bool is_tagged); |
399 LiveRange* LiveRangeFor(InstructionOperand* operand); | 400 LiveRange* LiveRangeFor(InstructionOperand* operand); |
400 void Define(LifetimePosition position, InstructionOperand* operand, | 401 void Define(LifetimePosition position, InstructionOperand* operand, |
401 InstructionOperand* hint); | 402 InstructionOperand* hint); |
402 void Use(LifetimePosition block_start, LifetimePosition position, | 403 void Use(LifetimePosition block_start, LifetimePosition position, |
403 InstructionOperand* operand, InstructionOperand* hint); | 404 InstructionOperand* operand, InstructionOperand* hint); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 RegisterAllocator* allocator_; | 539 RegisterAllocator* allocator_; |
539 unsigned allocator_zone_start_allocation_size_; | 540 unsigned allocator_zone_start_allocation_size_; |
540 | 541 |
541 DISALLOW_COPY_AND_ASSIGN(RegisterAllocatorPhase); | 542 DISALLOW_COPY_AND_ASSIGN(RegisterAllocatorPhase); |
542 }; | 543 }; |
543 } | 544 } |
544 } | 545 } |
545 } // namespace v8::internal::compiler | 546 } // namespace v8::internal::compiler |
546 | 547 |
547 #endif // V8_REGISTER_ALLOCATOR_H_ | 548 #endif // V8_REGISTER_ALLOCATOR_H_ |
OLD | NEW |