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

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

Issue 951553005: [turbofan] remove dependence of InstructionBlock on BasicBlock (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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-selector.cc ('k') | src/compiler/jump-threading.h » ('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/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-selector.h" 9 #include "src/compiler/instruction-selector.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
11 #include "src/compiler/schedule.h"
11 #include "src/macro-assembler.h" 12 #include "src/macro-assembler.h"
12 13
13 namespace v8 { 14 namespace v8 {
14 namespace internal { 15 namespace internal {
15 namespace compiler { 16 namespace compiler {
16 17
17 // A helper class for the instruction selector that simplifies construction of 18 // A helper class for the instruction selector that simplifies construction of
18 // Operands. This class implements a base for architecture-specific helpers. 19 // Operands. This class implements a base for architecture-specific helpers.
19 class OperandGenerator { 20 class OperandGenerator {
20 public: 21 public:
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 int index = sequence()->AddImmediate(Constant(imm)); 136 int index = sequence()->AddImmediate(Constant(imm));
136 return ImmediateOperand(index); 137 return ImmediateOperand(index);
137 } 138 }
138 139
139 InstructionOperand TempLocation(LinkageLocation location, MachineType type) { 140 InstructionOperand TempLocation(LinkageLocation location, MachineType type) {
140 return ToUnallocatedOperand(location, type, 141 return ToUnallocatedOperand(location, type,
141 sequence()->NextVirtualRegister()); 142 sequence()->NextVirtualRegister());
142 } 143 }
143 144
144 InstructionOperand Label(BasicBlock* block) { 145 InstructionOperand Label(BasicBlock* block) {
145 int index = sequence()->AddImmediate(Constant(block->GetRpoNumber())); 146 int index = sequence()->AddImmediate(
147 Constant(RpoNumber::FromInt(block->rpo_number())));
146 return ImmediateOperand(index); 148 return ImmediateOperand(index);
147 } 149 }
148 150
149 protected: 151 protected:
150 InstructionSelector* selector() const { return selector_; } 152 InstructionSelector* selector() const { return selector_; }
151 InstructionSequence* sequence() const { return selector()->sequence(); } 153 InstructionSequence* sequence() const { return selector()->sequence(); }
152 Zone* zone() const { return selector()->instruction_zone(); } 154 Zone* zone() const { return selector()->instruction_zone(); }
153 155
154 private: 156 private:
155 int GetVReg(Node* node) const { return selector_->GetVirtualRegister(node); } 157 int GetVReg(Node* node) const { return selector_->GetVirtualRegister(node); }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 : (frame_state_descriptor->GetTotalSize() + 364 : (frame_state_descriptor->GetTotalSize() +
363 1); // Include deopt id. 365 1); // Include deopt id.
364 } 366 }
365 }; 367 };
366 368
367 } // namespace compiler 369 } // namespace compiler
368 } // namespace internal 370 } // namespace internal
369 } // namespace v8 371 } // namespace v8
370 372
371 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 373 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/jump-threading.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698