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

Unified Diff: src/compiler/bytecode-graph-builder.h

Issue 2188533002: [turbofan] Generate loop exits in the bytecode graph builder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix 64-bit Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.h
diff --git a/src/compiler/bytecode-graph-builder.h b/src/compiler/bytecode-graph-builder.h
index d3742008c9b067df265b252f647ebec5ad4b3307..89f4f798851bc9484f245879de02b347fd0d05a5 100644
--- a/src/compiler/bytecode-graph-builder.h
+++ b/src/compiler/bytecode-graph-builder.h
@@ -7,6 +7,7 @@
#include "src/compiler.h"
#include "src/compiler/bytecode-branch-analysis.h"
+#include "src/compiler/bytecode-loop-analysis.h"
#include "src/compiler/js-graph.h"
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecode-flags.h"
@@ -148,6 +149,12 @@ class BytecodeGraphBuilder {
// Simulates control flow that exits the function body.
void MergeControlToLeaveFunction(Node* exit);
+ // Builds loop exit nodes for every exited loop between the current bytecode
+ // offset and {target_offset}.
+ void BuildLoopExitsForBranch(int target_offset);
+ void BuildLoopExitsForFunctionExit();
+ void BuildLoopExitsUntilLoop(int loop_offset);
+
// Simulates entry and exit of exception handlers.
void EnterAndExitExceptionHandlers(int current_offset);
@@ -203,6 +210,12 @@ class BytecodeGraphBuilder {
branch_analysis_ = branch_analysis;
}
+ const BytecodeLoopAnalysis* loop_analysis() const { return loop_analysis_; }
+
+ void set_loop_analysis(const BytecodeLoopAnalysis* loop_analysis) {
+ loop_analysis_ = loop_analysis;
+ }
+
#define DECLARE_VISIT_BYTECODE(name, ...) void Visit##name();
BYTECODE_LIST(DECLARE_VISIT_BYTECODE)
#undef DECLARE_VISIT_BYTECODE
@@ -215,6 +228,7 @@ class BytecodeGraphBuilder {
const FrameStateFunctionInfo* frame_state_function_info_;
const interpreter::BytecodeArrayIterator* bytecode_iterator_;
const BytecodeBranchAnalysis* branch_analysis_;
+ const BytecodeLoopAnalysis* loop_analysis_;
Environment* environment_;
BailoutId osr_ast_id_;
« no previous file with comments | « BUILD.gn ('k') | src/compiler/bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698