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

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

Issue 663333003: [turbofan] use ZonePool in most places in the compiler pipeline a temp zone is used. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « src/compiler/graph-builder.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 <deque> 8 #include <deque>
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/machine-operator.h" 12 #include "src/compiler/machine-operator.h"
13 #include "src/zone-containers.h" 13 #include "src/zone-containers.h"
14 14
15 namespace v8 { 15 namespace v8 {
16 namespace internal { 16 namespace internal {
17 namespace compiler { 17 namespace compiler {
18 18
19 // Forward declarations. 19 // Forward declarations.
20 struct CallBuffer; // TODO(bmeurer): Remove this. 20 struct CallBuffer; // TODO(bmeurer): Remove this.
21 class FlagsContinuation; 21 class FlagsContinuation;
22 22
23 class InstructionSelector FINAL { 23 class InstructionSelector FINAL {
24 public: 24 public:
25 // Forward declarations. 25 // Forward declarations.
26 class Features; 26 class Features;
27 27
28 InstructionSelector(Linkage* linkage, InstructionSequence* sequence, 28 InstructionSelector(Zone* local_zone, Linkage* linkage,
29 Schedule* schedule, SourcePositionTable* source_positions, 29 InstructionSequence* sequence, Schedule* schedule,
30 SourcePositionTable* source_positions,
30 Features features = SupportedFeatures()); 31 Features features = SupportedFeatures());
31 32
32 // Visit code for the entire graph with the included schedule. 33 // Visit code for the entire graph with the included schedule.
33 void SelectInstructions(); 34 void SelectInstructions();
34 35
35 // =========================================================================== 36 // ===========================================================================
36 // ============= Architecture-independent code emission methods. ============= 37 // ============= Architecture-independent code emission methods. =============
37 // =========================================================================== 38 // ===========================================================================
38 39
39 Instruction* Emit(InstructionCode opcode, InstructionOperand* output, 40 Instruction* Emit(InstructionCode opcode, InstructionOperand* output,
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 void VisitReturn(Node* value); 181 void VisitReturn(Node* value);
181 void VisitThrow(Node* value); 182 void VisitThrow(Node* value);
182 void VisitDeoptimize(Node* deopt); 183 void VisitDeoptimize(Node* deopt);
183 184
184 // =========================================================================== 185 // ===========================================================================
185 186
186 Schedule* schedule() const { return schedule_; } 187 Schedule* schedule() const { return schedule_; }
187 Linkage* linkage() const { return linkage_; } 188 Linkage* linkage() const { return linkage_; }
188 InstructionSequence* sequence() const { return sequence_; } 189 InstructionSequence* sequence() const { return sequence_; }
189 Zone* instruction_zone() const { return sequence()->zone(); } 190 Zone* instruction_zone() const { return sequence()->zone(); }
190 Zone* zone() { return &zone_; } 191 Zone* zone() const { return zone_; }
191 192
192 // =========================================================================== 193 // ===========================================================================
193 194
194 Zone zone_; 195 Zone* const zone_;
195 Linkage* const linkage_; 196 Linkage* const linkage_;
196 InstructionSequence* const sequence_; 197 InstructionSequence* const sequence_;
197 SourcePositionTable* const source_positions_; 198 SourcePositionTable* const source_positions_;
198 Features features_; 199 Features features_;
199 Schedule* const schedule_; 200 Schedule* const schedule_;
200 BasicBlock* current_block_; 201 BasicBlock* current_block_;
201 ZoneDeque<Instruction*> instructions_; 202 ZoneDeque<Instruction*> instructions_;
202 BoolVector defined_; 203 BoolVector defined_;
203 BoolVector used_; 204 BoolVector used_;
204 }; 205 };
205 206
206 } // namespace compiler 207 } // namespace compiler
207 } // namespace internal 208 } // namespace internal
208 } // namespace v8 209 } // namespace v8
209 210
210 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ 211 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_
OLDNEW
« no previous file with comments | « src/compiler/graph-builder.cc ('k') | src/compiler/instruction-selector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698