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 #include "src/compiler/linkage.h" | 5 #include "src/compiler/linkage.h" |
6 #include "src/compiler/register-allocator.h" | 6 #include "src/compiler/register-allocator.h" |
7 #include "src/string-stream.h" | 7 #include "src/string-stream.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1069 } | 1069 } |
1070 | 1070 |
1071 for (auto succ : block->successors()) { | 1071 for (auto succ : block->successors()) { |
1072 const InstructionBlock* successor = code()->InstructionBlockAt(succ); | 1072 const InstructionBlock* successor = code()->InstructionBlockAt(succ); |
1073 DCHECK(successor->PredecessorCount() == 1); | 1073 DCHECK(successor->PredecessorCount() == 1); |
1074 int gap_index = successor->first_instruction_index(); | 1074 int gap_index = successor->first_instruction_index(); |
1075 DCHECK(code()->IsGapAt(gap_index)); | 1075 DCHECK(code()->IsGapAt(gap_index)); |
1076 | 1076 |
1077 // Create an unconstrained operand for the same virtual register | 1077 // Create an unconstrained operand for the same virtual register |
1078 // and insert a gap move from the fixed output to the operand. | 1078 // and insert a gap move from the fixed output to the operand. |
1079 UnallocatedOperand* output_copy = | 1079 UnallocatedOperand* output_copy = new (code_zone()) |
1080 new (code_zone()) UnallocatedOperand(UnallocatedOperand::ANY); | 1080 UnallocatedOperand(UnallocatedOperand::ANY, output_vreg); |
1081 output_copy->set_virtual_register(output_vreg); | |
1082 | 1081 |
1083 AddGapMove(gap_index, GapInstruction::START, output, output_copy); | 1082 AddGapMove(gap_index, GapInstruction::START, output, output_copy); |
1084 } | 1083 } |
1085 } | 1084 } |
1086 | 1085 |
1087 if (!assigned) { | 1086 if (!assigned) { |
1088 for (auto succ : block->successors()) { | 1087 for (auto succ : block->successors()) { |
1089 const InstructionBlock* successor = code()->InstructionBlockAt(succ); | 1088 const InstructionBlock* successor = code()->InstructionBlockAt(succ); |
1090 DCHECK(successor->PredecessorCount() == 1); | 1089 DCHECK(successor->PredecessorCount() == 1); |
1091 int gap_index = successor->first_instruction_index(); | 1090 int gap_index = successor->first_instruction_index(); |
(...skipping 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2475 } else { | 2474 } else { |
2476 DCHECK(range->Kind() == GENERAL_REGISTERS); | 2475 DCHECK(range->Kind() == GENERAL_REGISTERS); |
2477 assigned_registers_->Add(reg); | 2476 assigned_registers_->Add(reg); |
2478 } | 2477 } |
2479 range->set_assigned_register(reg, code_zone()); | 2478 range->set_assigned_register(reg, code_zone()); |
2480 } | 2479 } |
2481 | 2480 |
2482 } // namespace compiler | 2481 } // namespace compiler |
2483 } // namespace internal | 2482 } // namespace internal |
2484 } // namespace v8 | 2483 } // namespace v8 |
OLD | NEW |