My Project
|
#include <ConstraintAnalysisGraph.h>
Public Types | |
enum | Kind { Kind::Anchor, Kind::OperandAnchor, Kind::ResultAnchor, Kind::LastAnchor = ResultAnchor, Kind::Constraint, Kind::SolveUniformConstraint, Kind::UniformPropagateExplicitScale, Kind::LastConstraint = UniformPropagateExplicitScale } |
using | node_vector = SmallVector< CAGNode *, 1 > |
using | iterator = node_vector::iterator |
using | const_iterator = node_vector::const_iterator |
Public Member Functions | |
virtual | ~CAGNode ()=default |
Kind | getKind () const |
int | getNodeId () const |
Unique id of the node within the slice. More... | |
bool | isDirty () const |
Whether the node is dirty, requiring one or more calls to propagate(). More... | |
void | markDirty () |
void | clearDirty () |
const_iterator | begin () const |
Iterator over this node's children (outgoing) nodes. More... | |
const_iterator | end () const |
iterator | begin () |
iterator | end () |
const_iterator | incoming_begin () const |
Iterator over this parents (incoming) nodes. More... | |
const_iterator | incoming_end () const |
iterator | incoming_begin () |
iterator | incoming_end () |
virtual void | propagate (SolverContext &solverContext, const TargetConfiguration &config) |
virtual void | printLabel (raw_ostream &os) const |
Prints the node label, suitable for one-line display. More... | |
template<typename T > | |
void | findChildrenOfKind (SmallVectorImpl< T *> &found) |
void | replaceIncoming (CAGNode *otherNode) |
void | addOutgoing (CAGNode *toNode) |
bool | isOrphan () const |
Whether this node is an orphan (has no incoming or outgoing connections). More... | |
Protected Member Functions | |
CAGNode (Kind kind) | |
Friends | |
class | CAGSlice |
A node in the Constraint Analysis Graph. Nodes are either anchors (representing results and operands) or constraints. Anchor nodes are connected to other anchor nodes via constraints. Nodes exist within graph slices, which are typically analyses attached to the function or module. Slices can contain other slices, which mirrors the nesting of analyses.
Nodes have directed relationships which propagate successor-ward when dirty. Relationships can be bi-directional, in which case, the constraint's propagation mechanism must ensure convergence.
using mlir::quantizer::CAGNode::const_iterator = node_vector::const_iterator |
using mlir::quantizer::CAGNode::iterator = node_vector::iterator |
using mlir::quantizer::CAGNode::node_vector = SmallVector<CAGNode *, 1> |
|
strong |
|
virtualdefault |
|
inlineprotected |
void CAGNode::addOutgoing | ( | CAGNode * | toNode | ) |
Adds an outgoing connection to this node (and corresponding back incoming connection).
|
inline |
Iterator over this node's children (outgoing) nodes.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Unique id of the node within the slice.
|
inline |
Iterator over this parents (incoming) nodes.
|
inline |
|
inline |
|
inline |
|
inline |
Whether the node is dirty, requiring one or more calls to propagate().
|
inline |
Whether this node is an orphan (has no incoming or outgoing connections).
|
inline |
|
virtual |
Prints the node label, suitable for one-line display.
Reimplemented in mlir::quantizer::CAGResultAnchor, mlir::quantizer::CAGOperandAnchor, and mlir::quantizer::CAGAnchorNode.
|
inlinevirtual |
Reimplemented in mlir::quantizer::CAGAnchorNode.
void CAGNode::replaceIncoming | ( | CAGNode * | otherNode | ) |
Replaces this node by rerouting any parent nodes to have otherNode as a child.
|
friend |