LLVM  10.0.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::PiBlockDDGNode Class Reference

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

#include "llvm/Analysis/DDG.h"

Inheritance diagram for llvm::PiBlockDDGNode:
[legend]
Collaboration diagram for llvm::PiBlockDDGNode:
[legend]

Public Types

using PiNodeList = SmallVector< DDGNode *, 4 >
 
- Public Types inherited from llvm::DDGNode
enum  NodeKind {
  NodeKind::Unknown, NodeKind::SingleInstruction, NodeKind::MultiInstruction, NodeKind::PiBlock,
  NodeKind::Root
}
 
using InstructionListType = SmallVectorImpl< Instruction * >
 
- Public Types inherited from llvm::DGNode< NodeType, EdgeType >
using EdgeListTy = SetVector< EdgeType * >
 
using iterator = typename EdgeListTy::iterator
 
using const_iterator = typename EdgeListTy::const_iterator
 

Public Member Functions

 PiBlockDDGNode ()=delete
 
 PiBlockDDGNode (const PiNodeList &List)
 
 PiBlockDDGNode (const PiBlockDDGNode &N)
 
 PiBlockDDGNode (PiBlockDDGNode &&N)
 
 ~PiBlockDDGNode ()
 
PiBlockDDGNode & operator= (const PiBlockDDGNode &N)
 
PiBlockDDGNode & operator= (PiBlockDDGNode &&N)
 
const PiNodeList & getNodes () const
 Get the list of nodes in this pi-block. More...
 
PiNodeList & getNodes ()
 
- Public Member Functions inherited from llvm::DDGNode
 DDGNode ()=delete
 
 DDGNode (const NodeKind K)
 
 DDGNode (const DDGNode &N)
 
 DDGNode (DDGNode &&N)
 
virtual ~DDGNode ()=0
 
DDGNode & operator= (const DDGNode &N)
 
DDGNode & operator= (DDGNode &&N)
 
NodeKind getKind () const
 Getter for the kind of this node. More...
 
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. More...
 
- Public Member Functions inherited from llvm::DGNode< NodeType, EdgeType >
 DGNode (EdgeType &E)
 Create a node with a single outgoing edge E. More...
 
 DGNode ()=default
 
 DGNode (const DGNode< NodeType, EdgeType > &N)
 
 DGNode (DGNode< NodeType, EdgeType > &&N)
 
DGNode< NodeType, EdgeType > & operator= (const DGNode< NodeType, EdgeType > &N)
 
DGNode< NodeType, EdgeType > & operator= (const DGNode< NodeType, EdgeType > &&N)
 
bool operator== (const NodeType &N) const
 Static polymorphism: delegate implementation (via isEqualTo) to the derived class. More...
 
bool operator!= (const NodeType &N) const
 
const_iterator begin () const
 
const_iterator end () const
 
iterator begin ()
 
iterator end ()
 
const EdgeType & front () const
 
EdgeType & front ()
 
const EdgeType & back () const
 
EdgeType & back ()
 
bool findEdgesTo (const NodeType &N, SmallVectorImpl< EdgeType *> &EL) const
 Collect in EL, all the edges from this node to N. More...
 
bool addEdge (EdgeType &E)
 Add the given edge E to this node, if it doesn't exist already. More...
 
void removeEdge (EdgeType &E)
 Remove the given edge E from this node, if it exists. More...
 
bool hasEdgeTo (const NodeType &N) const
 Test whether there is an edge that goes from this node to N. More...
 
const EdgeListTy & getEdges () const
 Retrieve the outgoing edges for the node. More...
 
EdgeListTy & getEdges ()
 
void clear ()
 Clear the outgoing edges. More...
 

Static Public Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from llvm::DDGNode
void setKind (NodeKind K)
 Setter for the kind of this node. More...
 
- Protected Member Functions inherited from llvm::DGNode< NodeType, EdgeType >
bool isEqualTo (const NodeType &N) const
 
NodeType & getDerived ()
 
const NodeType & getDerived () const
 
const_iterator findEdgeTo (const NodeType &N) const
 Find an edge to N. More...
 
- Protected Attributes inherited from llvm::DGNode< NodeType, EdgeType >
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 170 of file DDG.h.

Member Typedef Documentation

◆ PiNodeList

Definition at line 172 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 129 of file DDG.cpp.

References assert().

◆ PiBlockDDGNode() [3/4]

PiBlockDDGNode::PiBlockDDGNode ( const PiBlockDDGNode &  N)

Definition at line 134 of file DDG.cpp.

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

◆ PiBlockDDGNode() [4/4]

PiBlockDDGNode::PiBlockDDGNode ( PiBlockDDGNode &&  N)

Definition at line 140 of file DDG.cpp.

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

◆ ~PiBlockDDGNode()

PiBlockDDGNode::~PiBlockDDGNode ( )

Definition at line 146 of file DDG.cpp.

Member Function Documentation

◆ classof()

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

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

Definition at line 203 of file DDG.h.

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

◆ getNodes() [1/2]

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

Get the list of nodes in this pi-block.

Definition at line 193 of file DDG.h.

References assert().

◆ getNodes() [2/2]

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

Definition at line 197 of file DDG.h.

◆ operator=() [1/2]

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

Definition at line 180 of file DDG.h.

References llvm::DDGNode::operator=().

◆ operator=() [2/2]

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

Definition at line 186 of file DDG.h.

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


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