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

Unified Diff: src/compiler/int64-lowering.h

Issue 1655883002: [wasm] Initial commit for the Int64Reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Initialize replacement array Created 4 years, 10 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/int64-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/int64-lowering.h
diff --git a/src/compiler/int64-lowering.h b/src/compiler/int64-lowering.h
new file mode 100644
index 0000000000000000000000000000000000000000..dcdeae243de960cc20f7e1da1b88b04477561a08
--- /dev/null
+++ b/src/compiler/int64-lowering.h
@@ -0,0 +1,51 @@
+// Copyright 2014 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_INT64_REDUCER_H_
+#define V8_COMPILER_INT64_REDUCER_H_
+
+#include "src/compiler/common-operator.h"
+#include "src/compiler/graph.h"
+#include "src/compiler/machine-operator.h"
+#include "src/compiler/node-marker.h"
+#include "src/zone-containers.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+class Int64Lowering {
+ public:
+ Int64Lowering(Graph* graph, MachineOperatorBuilder* machine,
+ CommonOperatorBuilder* common, Zone* zone);
+
+ void ReduceGraph();
+ Graph* graph() const { return graph_; }
+ MachineOperatorBuilder* machine() const { return machine_; }
+ CommonOperatorBuilder* common() const { return common_; }
+
+ private:
+ enum class State : uint8_t { kUnvisited, kOnStack, kInputsPushed, kVisited };
+
+ struct Replacement {
+ Node* low;
+ Node* high;
+ };
+
+ void ReduceTop();
+ void ReduceNode(Node* node);
+
+ Graph* const graph_;
+ MachineOperatorBuilder* machine_;
+ CommonOperatorBuilder* common_;
+ NodeMarker<State> state_;
+ ZoneStack<Node*> stack_;
+ Replacement* replacements_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_INT64_REDUCER_H_
« no previous file with comments | « BUILD.gn ('k') | src/compiler/int64-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698