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

Unified Diff: src/compiler/effect-control-linearizer.h

Issue 1849603002: [turbofan] Effect linearization after representation inference. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 4 years, 8 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 | « src/compiler.h ('k') | src/compiler/effect-control-linearizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/effect-control-linearizer.h
diff --git a/src/compiler/effect-control-linearizer.h b/src/compiler/effect-control-linearizer.h
new file mode 100644
index 0000000000000000000000000000000000000000..846a6dfd092bb91c731a7dee0cacc6048f3b8d5a
--- /dev/null
+++ b/src/compiler/effect-control-linearizer.h
@@ -0,0 +1,80 @@
+// Copyright 2016 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_EFFECT_CONTROL_LINEARIZER_H_
+#define V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_
+
+#include "src/compiler/common-operator.h"
+#include "src/compiler/node.h"
+#include "src/compiler/simplified-operator.h"
+
+namespace v8 {
+namespace internal {
+
+class Zone;
+
+namespace compiler {
+
+class CommonOperatorBuilder;
+class SimplifiedOperatorBuilder;
+class MachineOperatorBuilder;
+class JSGraph;
+class Graph;
+class Schedule;
+
+class EffectControlLinearizer {
+ public:
+ EffectControlLinearizer(JSGraph* graph, Schedule* schedule, Zone* temp_zone);
+
+ void Run();
+
+ private:
+ void ProcessNode(Node* node, Node** current_effect, Node** control);
+
+ struct ValueEffectControl {
+ Node* value;
+ Node* effect;
+ Node* control;
+ ValueEffectControl(Node* value, Node* effect, Node* control)
+ : value(value), effect(effect), control(control) {}
+ };
+
+ bool TryWireInStateEffect(Node* node, Node** effect, Node** control);
+ ValueEffectControl LowerChangeInt32ToTagged(Node* node, Node* effect,
+ Node* control);
+ ValueEffectControl LowerChangeUint32ToTagged(Node* node, Node* effect,
+ Node* control);
+ ValueEffectControl LowerChangeFloat64ToTagged(Node* node, Node* effect,
+ Node* control);
+ ValueEffectControl AllocateHeapNumberWithValue(Node* node, Node* effect,
+ Node* control);
+
+ Node* ChangeInt32ToSmi(Node* value);
+ Node* ChangeUint32ToSmi(Node* value);
+ Node* ChangeInt32ToFloat64(Node* value);
+ Node* ChangeUint32ToFloat64(Node* value);
+
+ Node* HeapNumberValueIndexConstant();
+ Node* SmiMaxValueConstant();
+ Node* SmiShiftBitsConstant();
+
+ JSGraph* jsgraph() const { return js_graph_; }
+ Graph* graph() const;
+ Schedule* schedule() const { return schedule_; }
+ Zone* temp_zone() const { return temp_zone_; }
+ CommonOperatorBuilder* common() const;
+ SimplifiedOperatorBuilder* simplified() const;
+ MachineOperatorBuilder* machine() const;
+
+ JSGraph* js_graph_;
+ Schedule* schedule_;
+ Zone* temp_zone_;
+ SetOncePointer<const Operator> allocate_heap_number_operator_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_
« no previous file with comments | « src/compiler.h ('k') | src/compiler/effect-control-linearizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698