Lines Matching refs:node

10 #include "src/compiler/node-matchers.h"
35 T& operator[](const Node* node) {
36 NodeId id = node->id();
52 void Set(const Node* node, T value) {
53 auto iter = map_.find(node->id());
57 map_.insert(iter, std::make_pair(node->id(), std::move(value)));
60 const T& Get(const Node* node) const {
61 auto iter = map_.find(node->id());
70 // Keeps track of the changes to the current node during reduction.
74 // necessary node revisitations happen.
78 explicit ReduceScope(Node* node, Reduction* reduction)
79 : current_node_(node), reduction_(reduction) {}
97 // Dead node to ensure it is not read.
112 void Set(Variable var, Node* node) {
114 return map_.Set(var, node);
135 Scope(VariableTracker* tracker, Node* node, Reduction* reduction);
138 Node* node = current_state_.Get(var);
139 if (node && node->opcode() == IrOpcode::kDead) {
147 return Just(node);
149 void Set(Variable var, Node* node) { current_state_.Set(var, node); }
184 Node* node, Reduction* reduction)
185 : VariableTracker::Scope(&tracker->variable_states_, node, reduction),
188 const VirtualObject* GetVirtualObject(Node* node) {
189 VirtualObject* vobject = tracker_->virtual_objects_.Get(node);
193 // Create or retrieve a virtual object for the current node.
211 void SetEscaped(Node* node) {
212 if (VirtualObject* object = tracker_->virtual_objects_.Get(node)) {
215 node->op()->mnemonic(), node->id(),
221 // The inputs of the current node have to be accessed through the scope to
222 // ensure that they respect the node replacements.
231 // Accessing the current node is fine for `FrameState nodes.
267 Node* GetReplacementOf(Node* node) { return replacements_[node]; }
268 Node* ResolveReplacement(Node* node) {
269 if (Node* replacement = GetReplacementOf(node)) {
272 return node;
303 void EffectGraphReducer::ReduceFrom(Node* node) {
305 // A stack element {node, i} indicates that input i of node should be visited
308 stack_.push({node, 0});
311 Node* current = stack_.top().node;
360 void EffectGraphReducer::Revisit(Node* node) {
361 if (state_.Get(node) == State::kVisited) {
362 TRACE(" Queueing for revisit: %s#%d\n", node->op()->mnemonic(),
363 node->id());
364 state_.Set(node, State::kRevisit);
365 revisit_.push(node);
378 VariableTracker::Scope::Scope(VariableTracker* states, Node* node,
380 : ReduceScope(node, reduction),
383 switch (node->opcode()) {
385 current_state_ = states_->MergeInputs(node);
388 int effect_inputs = node->op()->EffectInputCount();
391 states_->table_.Get(NodeProperties::GetEffectInput(node, 0));
410 // node), this means that the variable initialization does not dominate the
454 // Reuse a previously created phi node if possible.
457 // Since a phi node can never dominate its control node,
728 // widen the type of the node. This could produce inconsistent
811 // We visit StateValue nodes through their correpsonding FrameState node,
825 if (Node* receiver = it.node()) {
849 void EscapeAnalysis::Reduce(Node* node, Reduction* reduction) {
850 const Operator* op = node->op();
851 TRACE("Reducing %s#%d\n", op->mnemonic(), node->id());
853 EscapeAnalysisTracker::Scope current(this, tracker_, node, reduction);
861 [this](Node* node, Reduction* reduction) { Reduce(node, reduction); },
866 Node* EscapeAnalysisResult::GetReplacementOf(Node* node) {
867 Node* replacement = tracker_->GetReplacementOf(node);
881 const VirtualObject* EscapeAnalysisResult::GetVirtualObject(Node* node) {
882 return tracker_->virtual_objects_.Get(node);