Lines Matching refs:Node
33 // CodeGen::Node allow, branch, dag;
58 // Node represents a node within the instruction DAG being compiled.
59 using Node = Program::size_type;
61 // kNullNode represents the "null" node; i.e., the reserved node
63 static const Node kNullNode = -1;
68 // MakeInstruction creates a node representing the specified
69 // instruction, or returns and existing equivalent node if one
73 Node MakeInstruction(uint16_t code,
75 Node jt = kNullNode,
76 Node jf = kNullNode);
80 Program Compile(Node head);
83 using MemoKey = std::tuple<uint16_t, uint32_t, Node, Node>;
87 Node AppendInstruction(uint16_t code, uint32_t k, Node jt, Node jf);
89 // WithinRange returns a node equivalent to |next| that is at most
92 Node WithinRange(Node next, size_t range);
96 Node Append(uint16_t code, uint32_t k, size_t jt, size_t jf);
99 size_t Offset(Node target) const;
105 // equivalent_ stores the most recent semantically-equivalent node for each
106 // instruction in program_. A node is defined as semantically-equivalent to N
109 // if it's an unconditional jump to a node semantically-equivalent to N.
110 std::vector<Node> equivalent_;
112 std::map<MemoKey, Node> memos_;