Lines Matching refs:node
36 #include "src/compiler/node-matchers.h"
37 #include "src/compiler/node-origin-table.h"
38 #include "src/compiler/node-properties.h"
203 void MergeControlToEnd(Node* node) {
204 NodeProperties::MergeControlToEnd(graph(), mcgraph()->common(), node);
224 // Returns the Branch node. Does not change control().
552 // Initialize instance node.
563 // We need an instance node anyway, because FromJS() needs to pass it to
622 bool WasmGraphBuilder::ThrowsException(Node* node, Node** if_success,
624 if (node->op()->HasProperty(compiler::Operator::kNoThrow)) {
628 *if_success = graph()->NewNode(mcgraph()->common()->IfSuccess(), node);
630 graph()->NewNode(mcgraph()->common()->IfException(), node, node);
701 // For wasm functions, the IsolateRoot is loaded from the instance node so
808 // Place a stack check which uses a dummy node as control and effect.
825 // Then rewire the dummy node to use start instead.
1498 Node* node = SetControl(graph()->NewNode(mcgraph()->common()->TrapIf(trap_id),
1500 SetSourcePosition(node, position);
1506 Node* node = SetControl(graph()->NewNode(
1508 SetSourcePosition(node, position);
1511 // Add a check that traps if {node} is equal to {val}.
1512 void WasmGraphBuilder::TrapIfEq32(wasm::TrapReason reason, Node* node,
1515 Int32Matcher m(node);
1518 TrapIfFalse(reason, node, position);
1520 TrapIfTrue(reason, gasm_->Word32Equal(node, Int32Constant(val)), position);
1524 // Add a check that traps if {node} is zero.
1525 void WasmGraphBuilder::ZeroCheck32(wasm::TrapReason reason, Node* node,
1527 TrapIfEq32(reason, node, 0, position);
1530 // Add a check that traps if {node} is equal to {val}.
1531 void WasmGraphBuilder::TrapIfEq64(wasm::TrapReason reason, Node* node,
1534 Int64Matcher m(node);
1536 TrapIfTrue(reason, gasm_->Word64Equal(node, Int64Constant(val)), position);
1539 // Add a check that traps if {node} is zero.
1540 void WasmGraphBuilder::ZeroCheck64(wasm::TrapReason reason, Node* node,
1542 TrapIfEq64(reason, node, 0, position);
1583 // Connect control to end via a Throw() node.
1587 Node* WasmGraphBuilder::MaskShiftCount32(Node* node) {
1591 Int32Matcher match(node);
1594 if (match.ResolvedValue() != masked) node = Int32Constant(masked);
1596 node = gasm_->Word32And(node, Int32Constant(kMask32));
1599 return node;
1602 Node* WasmGraphBuilder::MaskShiftCount64(Node* node) {
1606 Int64Matcher match(node);
1609 if (match.ResolvedValue() != masked) node = Int64Constant(masked);
1611 node = gasm_->Word64And(node, Int64Constant(kMask64));
1614 return node;
1635 Node* node, MachineRepresentation mem_rep, wasm::ValueType wasmtype) {
1637 Node* value = node;
1645 value = gasm_->BitcastFloat64ToInt64(node);
1652 value = gasm_->BitcastFloat32ToInt32(node);
1666 // No need to change endianness for byte size, return original node
1667 return node;
1751 Node* WasmGraphBuilder::BuildChangeEndiannessLoad(Node* node,
1755 Node* value = node;
1763 value = gasm_->BitcastFloat64ToInt64(node);
1770 value = gasm_->BitcastFloat32ToInt32(node);
1778 // No need to change endianness for byte size, return original node
1779 return node;
3018 // Return calls have no effect output. Other calls are the new effect node.
3434 Node* WasmGraphBuilder::Invert(Node* node) {
3435 return Unop(wasm::kExprI32Eqz, node);
3453 Node* WasmGraphBuilder::BuildChangeUint32ToUintPtr(Node* node) {
3454 if (mcgraph()->machine()->Is32()) return node;
3456 Uint32Matcher matcher(node);
3461 return gasm_->ChangeUint32ToUint64(node);
3577 // + 1 for the merge node.
3596 // + 1 for the merge node.
3613 Node* WasmGraphBuilder::SetEffect(Node* node) {
3614 SetEffectControl(node, control());
3615 return node;
3618 Node* WasmGraphBuilder::SetControl(Node* node) {
3619 SetEffectControl(effect(), node);
3620 return node;
4344 void WasmGraphBuilder::PrintDebugName(Node* node) {
4345 PrintF("#%d:%s", node->id(), node->op()->mnemonic());
4429 void WasmGraphBuilder::SetSourcePosition(Node* node,
4433 source_position_table_->SetSourcePosition(node, SourcePosition(position));
5475 for (Node** node : nodes) {
5476 *node = BuildChangeUint32ToUintPtr(*node);
5482 for (Node** node : nodes) {
5484 gasm_->TruncateInt64ToInt32(gasm_->Word64Shr(*node, Int32Constant(32)));
5488 *node = gasm_->TruncateInt64ToInt32(*node);
5638 // Call node to have no control inputs, which means it could get scheduled
6176 void Decorate(Node* node) final {
6178 node, NodeOrigin("wasm graph creation", "n/a",
6387 Node* ToJS(Node* node, wasm::ValueType type, Node* context) {
6390 return BuildChangeInt32ToNumber(node);
6392 return BuildChangeInt64ToBigInt(node);
6394 return BuildChangeFloat32ToNumber(node);
6396 return BuildChangeFloat64ToNumber(node);
6405 gasm_->GotoIf(IsNull(node), &done, node);
6408 MachineType::TaggedPointer(), node,
6415 MachineType::TaggedPointer(), node,
6429 gasm_->GotoIf(IsNull(node), &done, node);
6430 gasm_->Goto(&done, BuildAllocateObjectWrapper(node, context));
6434 return BuildAllocateObjectWrapper(node, context);
6437 if (!enabled_features_.has_gc()) return node;
6438 // Wrap {node} in object wrapper if it is an array/struct.
6447 gasm_->GotoIf(IsSmi(node), &done, node);
6448 gasm_->GotoIf(gasm_->IsDataRefMap(gasm_->LoadMap(node)), &wrap);
6450 gasm_->HasInstanceType(node, WASM_INTERNAL_FUNCTION_TYPE),
6452 // This includes the case where {node == null}.
6453 gasm_->Goto(&done, node);
6456 gasm_->Goto(&done, BuildAllocateObjectWrapper(node, context));
6460 MachineType::TaggedPointer(), node,
6472 MachineType::TaggedPointer(), node,
6583 // The instance node is always defined: if an instance is not available, it
7400 auto store_stack = [this](Node* node) -> Node* {
7407 stack_slot, 0, node);
8011 Node* node = nullptr;
8016 node = builder.Unop(opcode, builder.Param(1));
8019 node = builder.Binop(opcode, builder.Param(1), builder.Param(2));
8025 builder.Return(node);