17#ifndef __LOCO_IR_NODE_H__
18#define __LOCO_IR_NODE_H__
49template <SubstQualifier Q>
class Subst;
112 Graph *_graph =
nullptr;
119 std::set<Use *> _uses;
139 void with(
Node *into)
const;
Logical unit of computation.
virtual Node * arg(uint32_t N) const =0
Access N-th argument node.
virtual uint32_t arity(void) const =0
Return the number of arguments.
virtual void drop(void)=0
Drop all the reference of arguments.
const Graph * graph(void) const
virtual const Dialect * dialect(void) const =0
Return "Dialect" identifier that this node belongs to.
friend std::set< Node * > succs(const Node *node)
Enumerate all the successors of a given node.
virtual uint32_t opnum(void) const =0
The edge between a node definition and its user.
std::set< Node * > succs(const Node *node)
Enumerate all the successors of a given node.
std::set< Node * > preds(const Node *node)
Enumerate all the predecessors of a given node.
T must_cast(FeatureEncoder *node)
A helper dynamic_cast that throws when failed.
Subst< SubstQualifier::Default > replace(Node *node)
Extensible Node Metadata.
virtual ~NodeAnnotation()=default