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

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

Issue 1075863002: [turbofan] Make AllocatedOperand an InstructionOperand::Kind. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/register-allocator.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/graph.h" 6 #include "src/compiler/graph.h"
7 #include "src/compiler/instruction.h" 7 #include "src/compiler/instruction.h"
8 #include "src/compiler/schedule.h" 8 #include "src/compiler/schedule.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 28 matching lines...) Expand all
39 return os << "(1)"; 39 return os << "(1)";
40 case UnallocatedOperand::ANY: 40 case UnallocatedOperand::ANY:
41 return os << "(-)"; 41 return os << "(-)";
42 } 42 }
43 } 43 }
44 case InstructionOperand::CONSTANT: 44 case InstructionOperand::CONSTANT:
45 return os << "[constant:" << ConstantOperand::cast(op).virtual_register() 45 return os << "[constant:" << ConstantOperand::cast(op).virtual_register()
46 << "]"; 46 << "]";
47 case InstructionOperand::IMMEDIATE: 47 case InstructionOperand::IMMEDIATE:
48 return os << "[immediate:" << ImmediateOperand::cast(op).index() << "]"; 48 return os << "[immediate:" << ImmediateOperand::cast(op).index() << "]";
49 case InstructionOperand::STACK_SLOT: 49 case InstructionOperand::ALLOCATED:
50 return os << "[stack:" << StackSlotOperand::cast(op).index() << "]"; 50 switch (AllocatedOperand::cast(op).allocated_kind()) {
51 case InstructionOperand::DOUBLE_STACK_SLOT: 51 case AllocatedOperand::STACK_SLOT:
52 return os << "[double_stack:" << DoubleStackSlotOperand::cast(op).index() 52 return os << "[stack:" << StackSlotOperand::cast(op).index() << "]";
53 << "]"; 53 case AllocatedOperand::DOUBLE_STACK_SLOT:
54 case InstructionOperand::REGISTER: 54 return os << "[double_stack:"
55 return os << "[" 55 << DoubleStackSlotOperand::cast(op).index() << "]";
56 << conf->general_register_name( 56 case AllocatedOperand::REGISTER:
57 RegisterOperand::cast(op).index()) << "|R]"; 57 return os << "["
58 case InstructionOperand::DOUBLE_REGISTER: 58 << conf->general_register_name(
59 return os << "[" 59 RegisterOperand::cast(op).index()) << "|R]";
60 << conf->double_register_name( 60 case AllocatedOperand::DOUBLE_REGISTER:
61 DoubleRegisterOperand::cast(op).index()) << "|R]"; 61 return os << "["
62 << conf->double_register_name(
63 DoubleRegisterOperand::cast(op).index()) << "|R]";
64 }
62 case InstructionOperand::INVALID: 65 case InstructionOperand::INVALID:
63 return os << "(x)"; 66 return os << "(x)";
64 } 67 }
65 UNREACHABLE(); 68 UNREACHABLE();
66 return os; 69 return os;
67 } 70 }
68 71
69 72
70 std::ostream& operator<<(std::ostream& os, 73 std::ostream& operator<<(std::ostream& os,
71 const PrintableMoveOperands& printable) { 74 const PrintableMoveOperands& printable) {
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 os << " B" << succ.ToInt(); 747 os << " B" << succ.ToInt();
745 } 748 }
746 os << "\n"; 749 os << "\n";
747 } 750 }
748 return os; 751 return os;
749 } 752 }
750 753
751 } // namespace compiler 754 } // namespace compiler
752 } // namespace internal 755 } // namespace internal
753 } // namespace v8 756 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction.h ('k') | src/compiler/register-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698