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

Side by Side Diff: src/compiler/instruction.cc

Issue 738853002: [turbofan]: delay ssa deconstruction in register allocator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 6 years, 1 month 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
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common-operator.h" 5 #include "src/compiler/common-operator.h"
6 #include "src/compiler/generic-node-inl.h" 6 #include "src/compiler/generic-node-inl.h"
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 os << " instructions: [" << block->code_start() << ", " 637 os << " instructions: [" << block->code_start() << ", "
638 << block->code_end() << ")\n predecessors:"; 638 << block->code_end() << ")\n predecessors:";
639 639
640 for (auto pred : block->predecessors()) { 640 for (auto pred : block->predecessors()) {
641 const InstructionBlock* pred_block = code.InstructionBlockAt(pred); 641 const InstructionBlock* pred_block = code.InstructionBlockAt(pred);
642 os << " B" << pred_block->id(); 642 os << " B" << pred_block->id();
643 } 643 }
644 os << "\n"; 644 os << "\n";
645 645
646 for (auto phi : block->phis()) { 646 for (auto phi : block->phis()) {
647 os << " phi: v" << phi->virtual_register() << " ="; 647 PrintableInstructionOperand printable_op = {
648 for (auto op_vreg : phi->operands()) { 648 printable.register_configuration_, phi->output()};
649 os << " v" << op_vreg; 649 os << " phi: " << printable_op << " =";
650 for (auto input : phi->inputs()) {
651 printable_op.op_ = input;
652 os << " " << printable_op;
650 } 653 }
651 os << "\n"; 654 os << "\n";
652 } 655 }
653 656
654 ScopedVector<char> buf(32); 657 ScopedVector<char> buf(32);
655 PrintableInstruction printable_instr; 658 PrintableInstruction printable_instr;
656 printable_instr.register_configuration_ = printable.register_configuration_; 659 printable_instr.register_configuration_ = printable.register_configuration_;
657 for (int j = block->first_instruction_index(); 660 for (int j = block->first_instruction_index();
658 j <= block->last_instruction_index(); j++) { 661 j <= block->last_instruction_index(); j++) {
659 // TODO(svenpanne) Add some basic formatting to our streams. 662 // TODO(svenpanne) Add some basic formatting to our streams.
660 SNPrintF(buf, "%5d", j); 663 SNPrintF(buf, "%5d", j);
661 printable_instr.instr_ = code.InstructionAt(j); 664 printable_instr.instr_ = code.InstructionAt(j);
662 os << " " << buf.start() << ": " << printable_instr << "\n"; 665 os << " " << buf.start() << ": " << printable_instr << "\n";
663 } 666 }
664 667
665 for (auto succ : block->successors()) { 668 for (auto succ : block->successors()) {
666 const InstructionBlock* succ_block = code.InstructionBlockAt(succ); 669 const InstructionBlock* succ_block = code.InstructionBlockAt(succ);
667 os << " B" << succ_block->id(); 670 os << " B" << succ_block->id();
668 } 671 }
669 os << "\n"; 672 os << "\n";
670 } 673 }
671 return os; 674 return os;
672 } 675 }
673 676
674 } // namespace compiler 677 } // namespace compiler
675 } // namespace internal 678 } // namespace internal
676 } // namespace v8 679 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698