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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 758073002: [turbofan] Use special constant type for RPO block number operands. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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.cc ('k') | src/compiler/mips/code-generator-mips.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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/generic-node-inl.h" 8 #include "src/compiler/generic-node-inl.h"
9 #include "src/compiler/instruction.h" 9 #include "src/compiler/instruction.h"
10 #include "src/compiler/instruction-selector.h" 10 #include "src/compiler/instruction-selector.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 return ImmediateOperand::Create(index, zone()); 130 return ImmediateOperand::Create(index, zone());
131 } 131 }
132 132
133 InstructionOperand* TempLocation(LinkageLocation location, MachineType type) { 133 InstructionOperand* TempLocation(LinkageLocation location, MachineType type) {
134 UnallocatedOperand* op = ToUnallocatedOperand(location, type); 134 UnallocatedOperand* op = ToUnallocatedOperand(location, type);
135 op->set_virtual_register(sequence()->NextVirtualRegister()); 135 op->set_virtual_register(sequence()->NextVirtualRegister());
136 return op; 136 return op;
137 } 137 }
138 138
139 InstructionOperand* Label(BasicBlock* block) { 139 InstructionOperand* Label(BasicBlock* block) {
140 // TODO(bmeurer): We misuse ImmediateOperand here. 140 int index = sequence()->AddImmediate(Constant(block->GetRpoNumber()));
141 return TempImmediate(block->rpo_number()); 141 return ImmediateOperand::Create(index, zone());
142 } 142 }
143 143
144 protected: 144 protected:
145 InstructionSelector* selector() const { return selector_; } 145 InstructionSelector* selector() const { return selector_; }
146 InstructionSequence* sequence() const { return selector()->sequence(); } 146 InstructionSequence* sequence() const { return selector()->sequence(); }
147 Isolate* isolate() const { return zone()->isolate(); } 147 Isolate* isolate() const { return zone()->isolate(); }
148 Zone* zone() const { return selector()->instruction_zone(); } 148 Zone* zone() const { return selector()->instruction_zone(); }
149 149
150 private: 150 private:
151 static Constant ToConstant(const Node* node) { 151 static Constant ToConstant(const Node* node) {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 : (frame_state_descriptor->GetTotalSize() + 359 : (frame_state_descriptor->GetTotalSize() +
360 1); // Include deopt id. 360 1); // Include deopt id.
361 } 361 }
362 }; 362 };
363 363
364 } // namespace compiler 364 } // namespace compiler
365 } // namespace internal 365 } // namespace internal
366 } // namespace v8 366 } // namespace v8
367 367
368 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 368 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction.cc ('k') | src/compiler/mips/code-generator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698