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

Unified Diff: src/compiler/escape-analysis-reducer.h

Issue 1457683003: [turbofan] Initial support for escape analysis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bug + small improvements 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/escape-analysis-reducer.h
diff --git a/src/compiler/escape-analysis-reducer.h b/src/compiler/escape-analysis-reducer.h
new file mode 100644
index 0000000000000000000000000000000000000000..f2bf1ee0b2447629595096cf4b85f27d02ff831d
--- /dev/null
+++ b/src/compiler/escape-analysis-reducer.h
@@ -0,0 +1,55 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_
+#define V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_
+
+#include "src/compiler/escape-analysis.h"
+#include "src/compiler/graph-reducer.h"
+#include "src/compiler/js-graph.h"
+
+namespace v8 {
+namespace internal {
+
+namespace compiler {
+
+// Forward declarations.
+class JSGraph;
+
+
+class EscapeAnalysisReducer final : public AdvancedReducer {
+ public:
+ EscapeAnalysisReducer(Editor* editor, JSGraph* jsgraph,
+ EscapeStatusAnalysis* escape_status,
+ EscapeObjectAnalysis* escape_analysis, Zone* zone);
+
+ Reduction Reduce(Node* node) final;
+
+ private:
+ Reduction ReduceLoadField(Node* node);
+ Reduction ReduceStoreField(Node* node);
+ Reduction ReduceAllocate(Node* node);
+ Reduction ReduceFinishRegion(Node* node);
+ Reduction ReduceReferenceEqual(Node* node);
+
+ Reduction ReplaceWithDeoptDummy(Node* node);
+
+ JSGraph* jsgraph() const { return jsgraph_; }
+ EscapeObjectAnalysis* escape_analysis() const { return escape_analysis_; }
+ EscapeStatusAnalysis* escape_status() const { return escape_status_; }
+ Zone* zone() const { return zone_; }
+
+ JSGraph* const jsgraph_;
+ EscapeStatusAnalysis* escape_status_;
+ EscapeObjectAnalysis* escape_analysis_;
+ Zone* const zone_;
+
+ DISALLOW_COPY_AND_ASSIGN(EscapeAnalysisReducer);
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_

Powered by Google App Engine
This is Rietveld 408576698