LLVM: llvm::DDGNode Class Reference (original) (raw)

Data Dependence Graph Node The graph can represent the following types of nodes: More...

#include "[llvm/Analysis/DDG.h](DDG%5F8h%5Fsource.html)"

Public Types
enum class NodeKind { Unknown, SingleInstruction, MultiInstruction, PiBlock, Root }
using InstructionListType = SmallVectorImpl<Instruction *>
Public Types inherited from llvm::DGNode< DDGNode, DDGEdge >
using EdgeListTy
using iterator
using const_iterator
Public Member Functions
DDGNode ()=delete
DDGNode (const NodeKind K)
DDGNode (const DDGNode &N)=default
DDGNode (DDGNode &&N)
virtual ~DDGNode ()=0
DDGNode & operator= (const DDGNode &N)=default
DDGNode & operator= (DDGNode &&N)
NodeKind getKind () const
Getter for the kind of this node.
bool collectInstructions (llvm::function_ref< bool(Instruction *)> const &Pred, InstructionListType &IList) const
Collect a list of instructions, in IList, for which predicate Pred evaluates to true when iterating over instructions of this node.
Public Member Functions inherited from llvm::DGNode< DDGNode, DDGEdge >
DGNode (DDGEdge &E)
Create a node with a single outgoing edge E.
DGNode ()=default
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
const DDGEdge & front () const
DDGEdge & front ()
const DDGEdge & back () const
DDGEdge & back ()
bool findEdgesTo (const DDGNode &N, SmallVectorImpl< DDGEdge * > &EL) const
Collect in EL, all the edges from this node to N.
bool addEdge (DDGEdge &E)
Add the given edge E to this node, if it doesn't exist already.
void removeEdge (DDGEdge &E)
Remove the given edge E from this node, if it exists.
bool hasEdgeTo (const DDGNode &N) const
Test whether there is an edge that goes from this node to N.
const EdgeListTy & getEdges () const
Retrieve the outgoing edges for the node.
EdgeListTy & getEdges ()
void clear ()
Clear the outgoing edges.
Protected Member Functions
void setKind (NodeKind K)
Setter for the kind of this node.
Protected Member Functions inherited from llvm::DGNode< DDGNode, DDGEdge >
bool isEqualTo (const DDGNode &N) const
DDGNode & getDerived ()
const DDGNode & getDerived () const
const_iterator findEdgeTo (const DDGNode &N) const
Find an edge to N.

Data Dependence Graph Node The graph can represent the following types of nodes:

  1. Single instruction node containing just one instruction.
  2. Multiple instruction node where two or more instructions from the same basic block are merged into one node.
  3. Pi-block node which is a group of other DDG nodes that are part of a strongly-connected component of the graph. A pi-block node contains more than one single or multiple instruction nodes. The root node cannot be part of a pi-block.
  4. Root node is a special node that connects to all components such that there is always a path from it to any node in the graph.

Definition at line 45 of file DDG.h.

InstructionListType

Definition at line 47 of file DDG.h.

NodeKind

Enumerator
Unknown
SingleInstruction
MultiInstruction
PiBlock
Root

Definition at line 49 of file DDG.h.

DDGNode() [1/4]

llvm::DDGNode::DDGNode ( ) delete

Referenced by llvm::PiBlockDDGNode::classof(), llvm::RootDDGNode::classof(), llvm::SimpleDDGNode::classof(), collectInstructions(), DDGNode(), DDGNode(), operator=(), operator=(), llvm::PiBlockDDGNode::PiBlockDDGNode(), llvm::PiBlockDDGNode::PiBlockDDGNode(), llvm::PiBlockDDGNode::PiBlockDDGNode(), llvm::RootDDGNode::RootDDGNode(), llvm::RootDDGNode::RootDDGNode(), llvm::SimpleDDGNode::SimpleDDGNode(), llvm::SimpleDDGNode::SimpleDDGNode(), and llvm::SimpleDDGNode::SimpleDDGNode().

DDGNode() [2/4]

llvm::DDGNode::DDGNode ( const NodeKind K) inline

Definition at line 58 of file DDG.h.

DDGNode() [3/4]

References DDGNode(), and N.

DDGNode() [4/4]

llvm::DDGNode::DDGNode ( DDGNode && N) inline
DDGNode::~DDGNode ( ) pure virtualdefault

collectInstructions()

Collect a list of instructions, in IList, for which predicate Pred evaluates to true when iterating over instructions of this node.

Return true if at least one instruction was collected, and false otherwise.

Definition at line 38 of file DDG.cpp.

References llvm::append_range(), assert(), llvm::cast(), DDGNode(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), I, llvm::isa(), llvm_unreachable, and llvm::SmallVectorTemplateBase< T, bool >::push_back().

getKind()

NodeKind llvm::DDGNode::getKind ( ) const inline

operator=() [1/2]

operator=() [2/2]

Definition at line 65 of file DDG.h.

References DDGNode(), and N.

setKind()

void llvm::DDGNode::setKind ( NodeKind K) inlineprotected

Setter for the kind of this node.

Definition at line 82 of file DDG.h.


The documentation for this class was generated from the following files: