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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/compiler.h ('k') | src/compiler/effect-control-linearizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_
6 #define V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_
7
8 #include "src/compiler/common-operator.h"
9 #include "src/compiler/node.h"
10 #include "src/compiler/simplified-operator.h"
11
12 namespace v8 {
13 namespace internal {
14
15 class Zone;
16
17 namespace compiler {
18
19 class CommonOperatorBuilder;
20 class SimplifiedOperatorBuilder;
21 class MachineOperatorBuilder;
22 class JSGraph;
23 class Graph;
24 class Schedule;
25
26 class EffectControlLinearizer {
27 public:
28 EffectControlLinearizer(JSGraph* graph, Schedule* schedule, Zone* temp_zone);
29
30 void Run();
31
32 private:
33 void ProcessNode(Node* node, Node** current_effect, Node** control);
34
35 struct ValueEffectControl {
36 Node* value;
37 Node* effect;
38 Node* control;
39 ValueEffectControl(Node* value, Node* effect, Node* control)
40 : value(value), effect(effect), control(control) {}
41 };
42
43 bool TryWireInStateEffect(Node* node, Node** effect, Node** control);
44 ValueEffectControl LowerChangeInt32ToTagged(Node* node, Node* effect,
45 Node* control);
46 ValueEffectControl LowerChangeUint32ToTagged(Node* node, Node* effect,
47 Node* control);
48 ValueEffectControl LowerChangeFloat64ToTagged(Node* node, Node* effect,
49 Node* control);
50 ValueEffectControl AllocateHeapNumberWithValue(Node* node, Node* effect,
51 Node* control);
52
53 Node* ChangeInt32ToSmi(Node* value);
54 Node* ChangeUint32ToSmi(Node* value);
55 Node* ChangeInt32ToFloat64(Node* value);
56 Node* ChangeUint32ToFloat64(Node* value);
57
58 Node* HeapNumberValueIndexConstant();
59 Node* SmiMaxValueConstant();
60 Node* SmiShiftBitsConstant();
61
62 JSGraph* jsgraph() const { return js_graph_; }
63 Graph* graph() const;
64 Schedule* schedule() const { return schedule_; }
65 Zone* temp_zone() const { return temp_zone_; }
66 CommonOperatorBuilder* common() const;
67 SimplifiedOperatorBuilder* simplified() const;
68 MachineOperatorBuilder* machine() const;
69
70 JSGraph* js_graph_;
71 Schedule* schedule_;
72 Zone* temp_zone_;
73 SetOncePointer<const Operator> allocate_heap_number_operator_;
74 };
75
76 } // namespace compiler
77 } // namespace internal
78 } // namespace v8
79
80 #endif // V8_COMPILER_EFFECT_CONTROL_LINEARIZER_H_
OLDNEW
« 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