Home | History | Annotate | Download | only in compiler

Lines Matching refs:node

8 #include "src/compiler/node.h"
21 // A facade that simplifies access to the different kinds of inputs to a node.
27 // 0 [ values, context, frame state, effects, control ] node->InputCount()
29 static int FirstValueIndex(Node* node) { return 0; }
30 static int FirstContextIndex(Node* node) { return PastValueIndex(node); }
31 static int FirstFrameStateIndex(Node* node) { return PastContextIndex(node); }
32 static int FirstEffectIndex(Node* node) { return PastFrameStateIndex(node); }
33 static int FirstControlIndex(Node* node) { return PastEffectIndex(node); }
34 static int PastValueIndex(Node* node);
35 static int PastContextIndex(Node* node);
36 static int PastFrameStateIndex(Node* node);
37 static int PastEffectIndex(Node* node);
38 static int PastControlIndex(Node* node);
44 static Node* GetValueInput(Node* node, int index);
45 static Node* GetContextInput(Node* node);
46 static Node* GetFrameStateInput(Node* node);
47 static Node* GetEffectInput(Node* node, int index = 0);
48 static Node* GetControlInput(Node* node, int index = 0);
64 static bool IsCommon(Node* node) {
65 return IrOpcode::IsCommonOpcode(node->opcode());
67 static bool IsControl(Node* node) {
68 return IrOpcode::IsControlOpcode(node->opcode());
70 static bool IsConstant(Node* node) {
71 return IrOpcode::IsConstantOpcode(node->opcode());
73 static bool IsPhi(Node* node) {
74 return IrOpcode::IsPhiOpcode(node->opcode());
77 // Determines whether exceptions thrown by the given node are handled locally
79 static bool IsExceptionalCall(Node* node);
84 static void ReplaceValueInput(Node* node, Node* value, int index);
85 static void ReplaceContextInput(Node* node, Node* context);
86 static void ReplaceControlInput(Node* node, Node* control, int index = 0);
87 static void ReplaceEffectInput(Node* node, Node* effect, int index = 0);
88 static void ReplaceFrameStateInput(Node* node, Node* frame_state);
89 static void RemoveNonValueInputs(Node* node);
90 static void RemoveValueInputs(Node* node);
92 // Replaces all value inputs of {node} with the single input {value}.
93 static void ReplaceValueInputs(Node* node, Node* value);
95 // Merge the control node {node} into the end of the graph, introducing a
96 // merge node or expanding an existing merge node if necessary.
98 Node* node);
100 // Replace all uses of {node} with the given replacement nodes. All occurring
103 static void ReplaceUses(Node* node, Node* value, Node* effect = nullptr,
104 Node* success = nullptr, Node* exception = nullptr);
106 // Safe wrapper to mutate the operator of a node. Checks that the node is
108 static void ChangeOp(Node* node, const Operator* new_op);
113 // Find the last frame state that is effect-wise before the given node. This
114 // assumes a linear effect-chain up to a {CheckPoint} node in the graph.
115 static Node* FindFrameStateBefore(Node* node);
118 static Node* FindProjection(Node* node, size_t projection_index);
120 // Collect the branch-related projections from a node, such as IfTrue,
125 static void CollectControlProjections(Node* node, Node** proj, size_t count);
128 static bool IsSame(Node* a, Node* b);
139 Node* receiver, Node* effect, ZoneHandleSet<Map>* maps_return);
144 // Try to retrieve the specialization context from the given {node},
148 Node* node, MaybeHandle<Context> context = MaybeHandle<Context>());
150 // Walk up the context chain from the given {node} until we reduce the {depth}
151 // to 0 or hit a node that does not extend the context chain ({depth} will be
153 static Node* GetOuterContext(Node* node, size_t* depth);
158 static bool IsTyped(Node* node) { return node->type() != nullptr; }
159 static Type* GetType(Node* node) {
160 DCHECK(IsTyped(node));
161 return node->type();
163 static Type* GetTypeOrAny(Node* node);
164 static void SetType(Node* node, Type* type) {
166 node->set_type(type);
168 static void RemoveType(Node* node) { node->set_type(nullptr); }
169 static bool AllValueInputsAreTyped(Node* node);