LLVM 22.0.0git
llvm::PiBlockDDGNode Class Reference

Subclass of DDGNode representing a pi-block. More...

#include "llvm/Analysis/DDG.h"

Inheritance diagram for llvm::PiBlockDDGNode:
[legend]

Public Types

using PiNodeList = SmallVector<DDGNode *, 4>
Public Types inherited from llvm::DDGNode
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

 PiBlockDDGNode ()=delete
 PiBlockDDGNode (const PiNodeList &List)
 PiBlockDDGNode (const PiBlockDDGNode &N)
 PiBlockDDGNode (PiBlockDDGNode &&N)
 ~PiBlockDDGNode ()
PiBlockDDGNodeoperator= (const PiBlockDDGNode &N)=default
PiBlockDDGNodeoperator= (PiBlockDDGNode &&N)
const PiNodeListgetNodes () const
 Get the list of nodes in this pi-block.
PiNodeListgetNodes ()
Public Member Functions inherited from llvm::DDGNode
 DDGNode ()=delete
 DDGNode (const NodeKind K)
 DDGNode (const DDGNode &N)=default
 DDGNode (DDGNode &&N)
virtual ~DDGNode ()=0
DDGNodeoperator= (const DDGNode &N)
DDGNodeoperator= (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
 DGNode (const DGNode< DDGNode, DDGEdge > &N)
 DGNode (DGNode< DDGNode, DDGEdge > &&N)
DGNode< DDGNode, DDGEdge > & operator= (const DGNode< DDGNode, DDGEdge > &N)
DGNode< DDGNode, DDGEdge > & operator= (const DGNode< DDGNode, DDGEdge > &&N)
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
const DDGEdgefront () const
DDGEdgefront ()
const DDGEdgeback () const
DDGEdgeback ()
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 EdgeListTygetEdges () const
 Retrieve the outgoing edges for the node.
EdgeListTygetEdges ()
void clear ()
 Clear the outgoing edges.

Static Public Member Functions

static bool classof (const DDGNode *N)
 Define classof to be able to use isa<>, cast<>, dyn_cast<>, etc.

Additional Inherited Members

Protected Member Functions inherited from llvm::DDGNode
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
DDGNodegetDerived ()
const DDGNodegetDerived () const
const_iterator findEdgeTo (const DDGNode &N) const
 Find an edge to N.
Protected Attributes inherited from llvm::DGNode< DDGNode, DDGEdge >
EdgeListTy Edges

Detailed Description

Subclass of DDGNode representing a pi-block.

A pi-block represents a group of DDG nodes that are part of a strongly-connected component of the graph. Replacing all the SCCs with pi-blocks results in an acyclic representation of the DDG. For example if we have: {a -> b}, {b -> c, d}, {c -> a} the cycle a -> b -> c -> a is abstracted into a pi-block "p" as follows: {p -> d} with "p" containing: {a -> b}, {b -> c}, {c -> a}

Definition at line 171 of file DDG.h.

Member Typedef Documentation

◆ PiNodeList

Definition at line 173 of file DDG.h.

Constructor & Destructor Documentation

◆ PiBlockDDGNode() [1/4]

llvm::PiBlockDDGNode::PiBlockDDGNode ( )
delete

◆ PiBlockDDGNode() [2/4]

PiBlockDDGNode::PiBlockDDGNode ( const PiNodeList & List)

Definition at line 133 of file DDG.cpp.

References assert(), llvm::DDGNode::DDGNode(), llvm::List, and llvm::DDGNode::PiBlock.

◆ PiBlockDDGNode() [3/4]

PiBlockDDGNode::PiBlockDDGNode ( const PiBlockDDGNode & N)

◆ PiBlockDDGNode() [4/4]

PiBlockDDGNode::PiBlockDDGNode ( PiBlockDDGNode && N)

◆ ~PiBlockDDGNode()

PiBlockDDGNode::~PiBlockDDGNode ( )

Definition at line 150 of file DDG.cpp.

Member Function Documentation

◆ classof()

bool llvm::PiBlockDDGNode::classof ( const DDGNode * N)
inlinestatic

Define classof to be able to use isa<>, cast<>, dyn_cast<>, etc.

Definition at line 200 of file DDG.h.

References llvm::DDGNode::DDGNode(), N, and llvm::DDGNode::PiBlock.

◆ getNodes() [1/2]

PiNodeList & llvm::PiBlockDDGNode::getNodes ( )
inline

Definition at line 194 of file DDG.h.

References PiBlockDDGNode().

◆ getNodes() [2/2]

const PiNodeList & llvm::PiBlockDDGNode::getNodes ( ) const
inline

Get the list of nodes in this pi-block.

Definition at line 190 of file DDG.h.

References assert().

◆ operator=() [1/2]

PiBlockDDGNode & llvm::PiBlockDDGNode::operator= ( const PiBlockDDGNode & N)
default

References N, and PiBlockDDGNode().

◆ operator=() [2/2]

PiBlockDDGNode & llvm::PiBlockDDGNode::operator= ( PiBlockDDGNode && N)
inline

Definition at line 183 of file DDG.h.

References N, llvm::DDGNode::operator=(), and PiBlockDDGNode().


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