Lines Matching defs:node
8 #include "src/compiler/node-matchers.h"
78 Node* node = jsgraph()->graph()->NewNode(jsgraph()->common()->ObjectId(id));
79 NodeProperties::SetType(node, Type::Object());
80 object_id_cache_[id] = node;
85 Reduction EscapeAnalysisReducer::Reduce(Node* node) {
86 if (Node* replacement = analysis_result().GetReplacementOf(node)) {
87 DCHECK(node->opcode() != IrOpcode::kAllocate &&
88 node->opcode() != IrOpcode::kFinishRegion);
89 DCHECK_NE(replacement, node);
90 return ReplaceNode(node, replacement);
93 switch (node->opcode()) {
96 const VirtualObject* vobject = analysis_result().GetVirtualObject(node);
98 RelaxEffectsAndControls(node);
103 Node* effect = NodeProperties::GetEffectInput(node, 0);
106 RelaxEffectsAndControls(node);
111 arguments_elements_.insert(node);
116 // whether a node might have a frame state input.
117 if (node->op()->EffectInputCount() > 0) {
118 ReduceFrameStateInputs(node);
144 void EscapeAnalysisReducer::ReduceFrameStateInputs(Node* node) {
145 DCHECK_GE(node->op()->EffectInputCount(), 1);
146 for (int i = 0; i < node->InputCount(); ++i) {
147 Node* input = node->InputAt(i);
150 if (Node* ret = ReduceDeoptState(input, node, &deduplicator)) {
151 node->ReplaceInput(i, ret);
157 Node* EscapeAnalysisReducer::ReduceDeoptState(Node* node, Node* effect,
159 if (node->opcode() == IrOpcode::kFrameState) {
160 NodeHashCache::Constructor new_node(&node_cache_, node);
163 // duplicate node before the original one.
170 Node* input = node->InputAt(input_id);
175 } else if (node->opcode() == IrOpcode::kStateValues) {
176 NodeHashCache::Constructor new_node(&node_cache_, node);
177 for (int i = 0; i < node->op()->ValueInputCount(); ++i) {
178 Node* input = NodeProperties::GetValueInput(node, i);
184 SkipValueIdentities(node))) {
185 if (vobject->HasEscaped()) return node;
202 num_inputs, &inputs.front(), NodeProperties::GetType(node));
206 return node;
212 for (Node* node : all.reachable) {
213 if (node->opcode() == IrOpcode::kAllocate) {
215 analysis_result().GetVirtualObject(node)) {
217 FATAL("Escape analysis failed to remove node %s#%d\n",
218 node->op()->mnemonic(), node->id());
227 for (Node* node : arguments_elements_) {
229 NewArgumentsElementsParametersOf(node->op());
235 Node* arguments_length = NodeProperties::GetValueInput(node, 0);
261 for (Edge edge : node->use_edges()) {
265 // A node without uses is dead, so we don't have to care about it.
289 // If the arguments elements node node is used by an unhandled node,
300 ReplaceWithValue(node, arguments_elements_state);
351 Node* length = NodeProperties::GetValueInput(node, 0);
363 Node* NodeHashCache::Query(Node* node) {
364 auto it = cache_.find(node);
399 Node* node;
401 node = node_cache_->Query(from_);
402 if (!node) node = from_;
404 node = node_cache_->Query(tmp_);
405 if (node) {
408 node = tmp_;
409 node_cache_->Insert(node);
413 return node;