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

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

Issue 1375253002: [WIP][turbofan] Instruction scheduler for Turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase the patch Created 5 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-scheduler.cc ('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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
11 #include "src/compiler/instruction.h" 11 #include "src/compiler/instruction.h"
12 #include "src/compiler/instruction-scheduler.h"
12 #include "src/compiler/machine-operator.h" 13 #include "src/compiler/machine-operator.h"
13 #include "src/compiler/node.h" 14 #include "src/compiler/node.h"
14 #include "src/zone-containers.h" 15 #include "src/zone-containers.h"
15 16
16 namespace v8 { 17 namespace v8 {
17 namespace internal { 18 namespace internal {
18 namespace compiler { 19 namespace compiler {
19 20
20 // Forward declarations. 21 // Forward declarations.
21 class BasicBlock; 22 class BasicBlock;
(...skipping 17 matching lines...) Expand all
39 InstructionSelector( 40 InstructionSelector(
40 Zone* zone, size_t node_count, Linkage* linkage, 41 Zone* zone, size_t node_count, Linkage* linkage,
41 InstructionSequence* sequence, Schedule* schedule, 42 InstructionSequence* sequence, Schedule* schedule,
42 SourcePositionTable* source_positions, 43 SourcePositionTable* source_positions,
43 SourcePositionMode source_position_mode = kCallSourcePositions, 44 SourcePositionMode source_position_mode = kCallSourcePositions,
44 Features features = SupportedFeatures()); 45 Features features = SupportedFeatures());
45 46
46 // Visit code for the entire graph with the included schedule. 47 // Visit code for the entire graph with the included schedule.
47 void SelectInstructions(); 48 void SelectInstructions();
48 49
50 void StartBlock(RpoNumber rpo);
51 void EndBlock(RpoNumber rpo);
52 void AddInstruction(Instruction* instr);
53
49 // =========================================================================== 54 // ===========================================================================
50 // ============= Architecture-independent code emission methods. ============= 55 // ============= Architecture-independent code emission methods. =============
51 // =========================================================================== 56 // ===========================================================================
52 57
53 Instruction* Emit(InstructionCode opcode, InstructionOperand output, 58 Instruction* Emit(InstructionCode opcode, InstructionOperand output,
54 size_t temp_count = 0, InstructionOperand* temps = NULL); 59 size_t temp_count = 0, InstructionOperand* temps = NULL);
55 Instruction* Emit(InstructionCode opcode, InstructionOperand output, 60 Instruction* Emit(InstructionCode opcode, InstructionOperand output,
56 InstructionOperand a, size_t temp_count = 0, 61 InstructionOperand a, size_t temp_count = 0,
57 InstructionOperand* temps = NULL); 62 InstructionOperand* temps = NULL);
58 Instruction* Emit(InstructionCode opcode, InstructionOperand output, 63 Instruction* Emit(InstructionCode opcode, InstructionOperand output,
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 InstructionSequence* const sequence_; 251 InstructionSequence* const sequence_;
247 SourcePositionTable* const source_positions_; 252 SourcePositionTable* const source_positions_;
248 SourcePositionMode const source_position_mode_; 253 SourcePositionMode const source_position_mode_;
249 Features features_; 254 Features features_;
250 Schedule* const schedule_; 255 Schedule* const schedule_;
251 BasicBlock* current_block_; 256 BasicBlock* current_block_;
252 ZoneVector<Instruction*> instructions_; 257 ZoneVector<Instruction*> instructions_;
253 BoolVector defined_; 258 BoolVector defined_;
254 BoolVector used_; 259 BoolVector used_;
255 IntVector virtual_registers_; 260 IntVector virtual_registers_;
261 InstructionScheduler* scheduler_;
256 }; 262 };
257 263
258 } // namespace compiler 264 } // namespace compiler
259 } // namespace internal 265 } // namespace internal
260 } // namespace v8 266 } // namespace v8
261 267
262 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ 268 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-scheduler.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698