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

Side by Side Diff: src/compiler/bytecode-graph-builder.h

Issue 2519983002: [ignition] Replace branch+loop analysis with a single pass (Closed)
Patch Set: Update comments Created 4 years, 1 month 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/bytecode-branch-analysis.cc ('k') | src/compiler/bytecode-graph-builder.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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_BYTECODE_GRAPH_BUILDER_H_ 5 #ifndef V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_
6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ 6 #define V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_
7 7
8 #include "src/compiler/bytecode-branch-analysis.h" 8 #include "src/compiler/bytecode-analysis.h"
9 #include "src/compiler/bytecode-loop-analysis.h"
10 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
11 #include "src/compiler/liveness-analyzer.h" 10 #include "src/compiler/liveness-analyzer.h"
12 #include "src/compiler/state-values-utils.h" 11 #include "src/compiler/state-values-utils.h"
13 #include "src/compiler/type-hint-analyzer.h" 12 #include "src/compiler/type-hint-analyzer.h"
14 #include "src/interpreter/bytecode-array-iterator.h" 13 #include "src/interpreter/bytecode-array-iterator.h"
15 #include "src/interpreter/bytecode-flags.h" 14 #include "src/interpreter/bytecode-flags.h"
16 #include "src/interpreter/bytecodes.h" 15 #include "src/interpreter/bytecodes.h"
17 #include "src/source-position-table.h" 16 #include "src/source-position-table.h"
18 17
19 namespace v8 { 18 namespace v8 {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 246
248 const interpreter::BytecodeArrayIterator& bytecode_iterator() const { 247 const interpreter::BytecodeArrayIterator& bytecode_iterator() const {
249 return *bytecode_iterator_; 248 return *bytecode_iterator_;
250 } 249 }
251 250
252 void set_bytecode_iterator( 251 void set_bytecode_iterator(
253 const interpreter::BytecodeArrayIterator* bytecode_iterator) { 252 const interpreter::BytecodeArrayIterator* bytecode_iterator) {
254 bytecode_iterator_ = bytecode_iterator; 253 bytecode_iterator_ = bytecode_iterator;
255 } 254 }
256 255
257 const BytecodeBranchAnalysis* branch_analysis() const { 256 const BytecodeAnalysis* bytecode_analysis() const {
258 return branch_analysis_; 257 return bytecode_analysis_;
259 } 258 }
260 259
261 void set_branch_analysis(const BytecodeBranchAnalysis* branch_analysis) { 260 void set_bytecode_analysis(const BytecodeAnalysis* bytecode_analysis) {
262 branch_analysis_ = branch_analysis; 261 bytecode_analysis_ = bytecode_analysis;
263 }
264
265 const BytecodeLoopAnalysis* loop_analysis() const { return loop_analysis_; }
266
267 void set_loop_analysis(const BytecodeLoopAnalysis* loop_analysis) {
268 loop_analysis_ = loop_analysis;
269 } 262 }
270 263
271 LivenessAnalyzer* liveness_analyzer() { return &liveness_analyzer_; } 264 LivenessAnalyzer* liveness_analyzer() { return &liveness_analyzer_; }
272 265
273 bool IsLivenessAnalysisEnabled() const { 266 bool IsLivenessAnalysisEnabled() const {
274 return this->is_liveness_analysis_enabled_; 267 return this->is_liveness_analysis_enabled_;
275 } 268 }
276 269
277 #define DECLARE_VISIT_BYTECODE(name, ...) void Visit##name(); 270 #define DECLARE_VISIT_BYTECODE(name, ...) void Visit##name();
278 BYTECODE_LIST(DECLARE_VISIT_BYTECODE) 271 BYTECODE_LIST(DECLARE_VISIT_BYTECODE)
279 #undef DECLARE_VISIT_BYTECODE 272 #undef DECLARE_VISIT_BYTECODE
280 273
281 Zone* local_zone_; 274 Zone* local_zone_;
282 JSGraph* jsgraph_; 275 JSGraph* jsgraph_;
283 float const invocation_frequency_; 276 float const invocation_frequency_;
284 Handle<BytecodeArray> bytecode_array_; 277 Handle<BytecodeArray> bytecode_array_;
285 Handle<HandlerTable> exception_handler_table_; 278 Handle<HandlerTable> exception_handler_table_;
286 Handle<TypeFeedbackVector> feedback_vector_; 279 Handle<TypeFeedbackVector> feedback_vector_;
287 const FrameStateFunctionInfo* frame_state_function_info_; 280 const FrameStateFunctionInfo* frame_state_function_info_;
288 const interpreter::BytecodeArrayIterator* bytecode_iterator_; 281 const interpreter::BytecodeArrayIterator* bytecode_iterator_;
289 const BytecodeBranchAnalysis* branch_analysis_; 282 const BytecodeAnalysis* bytecode_analysis_;
290 const BytecodeLoopAnalysis* loop_analysis_;
291 Environment* environment_; 283 Environment* environment_;
292 BailoutId osr_ast_id_; 284 BailoutId osr_ast_id_;
293 285
294 // Merge environments are snapshots of the environment at points where the 286 // Merge environments are snapshots of the environment at points where the
295 // control flow merges. This models a forward data flow propagation of all 287 // control flow merges. This models a forward data flow propagation of all
296 // values from all predecessors of the merge in question. 288 // values from all predecessors of the merge in question.
297 ZoneMap<int, Environment*> merge_environments_; 289 ZoneMap<int, Environment*> merge_environments_;
298 290
299 // Exception handlers currently entered by the iteration. 291 // Exception handlers currently entered by the iteration.
300 ZoneStack<ExceptionHandler> exception_handlers_; 292 ZoneStack<ExceptionHandler> exception_handlers_;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 static int const kBinaryOperationSmiHintIndex = 2; 325 static int const kBinaryOperationSmiHintIndex = 2;
334 326
335 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder); 327 DISALLOW_COPY_AND_ASSIGN(BytecodeGraphBuilder);
336 }; 328 };
337 329
338 } // namespace compiler 330 } // namespace compiler
339 } // namespace internal 331 } // namespace internal
340 } // namespace v8 332 } // namespace v8
341 333
342 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_ 334 #endif // V8_COMPILER_BYTECODE_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « src/compiler/bytecode-branch-analysis.cc ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698