summaryrefslogtreecommitdiff
path: root/deps/v8/src/compiler/escape-analysis-reducer.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/compiler/escape-analysis-reducer.h')
-rw-r--r--deps/v8/src/compiler/escape-analysis-reducer.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/deps/v8/src/compiler/escape-analysis-reducer.h b/deps/v8/src/compiler/escape-analysis-reducer.h
new file mode 100644
index 0000000000..1c0da165fb
--- /dev/null
+++ b/deps/v8/src/compiler/escape-analysis-reducer.h
@@ -0,0 +1,63 @@
+// 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/bit-vector.h"
+#include "src/compiler/escape-analysis.h"
+#include "src/compiler/graph-reducer.h"
+
+
+namespace v8 {
+namespace internal {
+
+// Forward declarations.
+class Counters;
+
+
+namespace compiler {
+
+// Forward declarations.
+class JSGraph;
+
+
+class EscapeAnalysisReducer final : public AdvancedReducer {
+ public:
+ EscapeAnalysisReducer(Editor* editor, JSGraph* jsgraph,
+ EscapeAnalysis* escape_analysis, Zone* zone);
+
+ Reduction Reduce(Node* node) final;
+
+ private:
+ Reduction ReduceLoad(Node* node);
+ Reduction ReduceStore(Node* node);
+ Reduction ReduceAllocate(Node* node);
+ Reduction ReduceFinishRegion(Node* node);
+ Reduction ReduceReferenceEqual(Node* node);
+ Reduction ReduceObjectIsSmi(Node* node);
+ Reduction ReduceFrameStateUses(Node* node);
+ Node* ReduceFrameState(Node* node, Node* effect, bool multiple_users);
+ Node* ReduceStateValueInputs(Node* node, Node* effect, bool multiple_users);
+ Node* ReduceStateValueInput(Node* node, int node_index, Node* effect,
+ bool multiple_users);
+
+ JSGraph* jsgraph() const { return jsgraph_; }
+ EscapeAnalysis* escape_analysis() const { return escape_analysis_; }
+ Zone* zone() const { return zone_; }
+ Counters* counters() const;
+
+ JSGraph* const jsgraph_;
+ EscapeAnalysis* escape_analysis_;
+ Zone* const zone_;
+ BitVector visited_;
+
+ DISALLOW_COPY_AND_ASSIGN(EscapeAnalysisReducer);
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_ESCAPE_ANALYSIS_REDUCER_H_