Jlm
Public Member Functions | Static Public Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
jlm::llvm::ControlFlowGraph Class Referencefinal

#include <cfg.hpp>

Collaboration diagram for jlm::llvm::ControlFlowGraph:
Collaboration graph
[legend]

Public Member Functions

 ~ControlFlowGraph () noexcept=default
 
 ControlFlowGraph (InterProceduralGraphModule &im)
 
 ControlFlowGraph (const ControlFlowGraph &)=delete
 
 ControlFlowGraph (ControlFlowGraph &&)=delete
 
ControlFlowGraphoperator= (const ControlFlowGraph &)=delete
 
ControlFlowGraphoperator= (ControlFlowGraph &&)=delete
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
EntryNodeentry () const noexcept
 
ExitNodeexit () const noexcept
 
BasicBlockadd_node (std::unique_ptr< BasicBlock > bb)
 
ControlFlowGraph::iterator find_node (BasicBlock *bb)
 
size_t nnodes () const noexcept
 
InterProceduralGraphModulemodule () const noexcept
 
rvsdg::FunctionType fcttype () const
 

Static Public Member Functions

static ControlFlowGraph::iterator remove_node (ControlFlowGraph::iterator &it)
 
static ControlFlowGraph::iterator remove_node (BasicBlock *bb)
 
static std::unique_ptr< ControlFlowGraphcreate (InterProceduralGraphModule &im)
 
static std::string ToAscii (const ControlFlowGraph &controlFlowGraph)
 

Private Types

using iterator = util::PtrIterator< BasicBlock, std::unordered_set< std::unique_ptr< BasicBlock > >::iterator >
 
using const_iterator = util::PtrIterator< const BasicBlock, std::unordered_set< std::unique_ptr< BasicBlock > >::const_iterator >
 

Static Private Member Functions

static std::string ToAscii (const EntryNode &entryNode)
 
static std::string ToAscii (const ExitNode &exitNode)
 
static std::string ToAscii (const BasicBlock &basicBlock, const std::unordered_map< ControlFlowGraphNode *, std::string > &labels)
 
static std::string CreateTargets (const ControlFlowGraphNode &node, const std::unordered_map< ControlFlowGraphNode *, std::string > &labels)
 
static std::unordered_map< ControlFlowGraphNode *, std::string > CreateLabels (const std::vector< ControlFlowGraphNode * > &nodes)
 

Private Attributes

InterProceduralGraphModulemodule_
 
std::unique_ptr< ExitNodeexit_
 
std::unique_ptr< EntryNodeentry_
 
std::unordered_set< std::unique_ptr< BasicBlock > > nodes_
 

Detailed Description

Definition at line 157 of file cfg.hpp.

Member Typedef Documentation

◆ const_iterator

using jlm::llvm::ControlFlowGraph::const_iterator = util::PtrIterator< const BasicBlock, std::unordered_set<std::unique_ptr<BasicBlock> >::const_iterator>
private

Definition at line 161 of file cfg.hpp.

◆ iterator

using jlm::llvm::ControlFlowGraph::iterator = util::PtrIterator<BasicBlock, std::unordered_set<std::unique_ptr<BasicBlock> >::iterator>
private

Definition at line 159 of file cfg.hpp.

Constructor & Destructor Documentation

◆ ~ControlFlowGraph()

jlm::llvm::ControlFlowGraph::~ControlFlowGraph ( )
defaultnoexcept

◆ ControlFlowGraph() [1/3]

jlm::llvm::ControlFlowGraph::ControlFlowGraph ( InterProceduralGraphModule im)
explicit

Definition at line 25 of file cfg.cpp.

◆ ControlFlowGraph() [2/3]

jlm::llvm::ControlFlowGraph::ControlFlowGraph ( const ControlFlowGraph )
delete

◆ ControlFlowGraph() [3/3]

jlm::llvm::ControlFlowGraph::ControlFlowGraph ( ControlFlowGraph &&  )
delete

Member Function Documentation

◆ add_node()

BasicBlock* jlm::llvm::ControlFlowGraph::add_node ( std::unique_ptr< BasicBlock bb)
inline

Definition at line 217 of file cfg.hpp.

◆ begin() [1/2]

iterator jlm::llvm::ControlFlowGraph::begin ( )
inline

Definition at line 187 of file cfg.hpp.

◆ begin() [2/2]

const_iterator jlm::llvm::ControlFlowGraph::begin ( ) const
inline

Definition at line 181 of file cfg.hpp.

◆ create()

static std::unique_ptr<ControlFlowGraph> jlm::llvm::ControlFlowGraph::create ( InterProceduralGraphModule im)
inlinestatic

Definition at line 266 of file cfg.hpp.

◆ CreateLabels()

std::unordered_map< ControlFlowGraphNode *, std::string > jlm::llvm::ControlFlowGraph::CreateLabels ( const std::vector< ControlFlowGraphNode * > &  nodes)
staticprivate

Definition at line 166 of file cfg.cpp.

◆ CreateTargets()

std::string jlm::llvm::ControlFlowGraph::CreateTargets ( const ControlFlowGraphNode node,
const std::unordered_map< ControlFlowGraphNode *, std::string > &  labels 
)
staticprivate

Definition at line 148 of file cfg.cpp.

◆ end() [1/2]

iterator jlm::llvm::ControlFlowGraph::end ( )
inline

Definition at line 199 of file cfg.hpp.

◆ end() [2/2]

const_iterator jlm::llvm::ControlFlowGraph::end ( ) const
inline

Definition at line 193 of file cfg.hpp.

◆ entry()

EntryNode* jlm::llvm::ControlFlowGraph::entry ( ) const
inlinenoexcept

Definition at line 205 of file cfg.hpp.

◆ exit()

ExitNode* jlm::llvm::ControlFlowGraph::exit ( ) const
inlinenoexcept

Definition at line 211 of file cfg.hpp.

◆ fcttype()

rvsdg::FunctionType jlm::llvm::ControlFlowGraph::fcttype ( ) const
inline

Definition at line 252 of file cfg.hpp.

◆ find_node()

ControlFlowGraph::iterator jlm::llvm::ControlFlowGraph::find_node ( BasicBlock bb)
inline

Definition at line 225 of file cfg.hpp.

◆ module()

InterProceduralGraphModule& jlm::llvm::ControlFlowGraph::module ( ) const
inlinenoexcept

Definition at line 246 of file cfg.hpp.

◆ nnodes()

size_t jlm::llvm::ControlFlowGraph::nnodes ( ) const
inlinenoexcept

Definition at line 240 of file cfg.hpp.

◆ operator=() [1/2]

ControlFlowGraph& jlm::llvm::ControlFlowGraph::operator= ( const ControlFlowGraph )
delete

◆ operator=() [2/2]

ControlFlowGraph& jlm::llvm::ControlFlowGraph::operator= ( ControlFlowGraph &&  )
delete

◆ remove_node() [1/2]

ControlFlowGraph::iterator jlm::llvm::ControlFlowGraph::remove_node ( BasicBlock bb)
static

Definition at line 53 of file cfg.cpp.

◆ remove_node() [2/2]

ControlFlowGraph::iterator jlm::llvm::ControlFlowGraph::remove_node ( ControlFlowGraph::iterator it)
static

Definition at line 34 of file cfg.cpp.

◆ ToAscii() [1/4]

std::string jlm::llvm::ControlFlowGraph::ToAscii ( const BasicBlock basicBlock,
const std::unordered_map< ControlFlowGraphNode *, std::string > &  labels 
)
staticprivate

Definition at line 118 of file cfg.cpp.

◆ ToAscii() [2/4]

std::string jlm::llvm::ControlFlowGraph::ToAscii ( const ControlFlowGraph controlFlowGraph)
static

Definition at line 62 of file cfg.cpp.

◆ ToAscii() [3/4]

std::string jlm::llvm::ControlFlowGraph::ToAscii ( const EntryNode entryNode)
staticprivate

Definition at line 94 of file cfg.cpp.

◆ ToAscii() [4/4]

std::string jlm::llvm::ControlFlowGraph::ToAscii ( const ExitNode exitNode)
staticprivate

Definition at line 106 of file cfg.cpp.

Member Data Documentation

◆ entry_

std::unique_ptr<EntryNode> jlm::llvm::ControlFlowGraph::entry_
private

Definition at line 296 of file cfg.hpp.

◆ exit_

std::unique_ptr<ExitNode> jlm::llvm::ControlFlowGraph::exit_
private

Definition at line 295 of file cfg.hpp.

◆ module_

InterProceduralGraphModule& jlm::llvm::ControlFlowGraph::module_
private

Definition at line 294 of file cfg.hpp.

◆ nodes_

std::unordered_set<std::unique_ptr<BasicBlock> > jlm::llvm::ControlFlowGraph::nodes_
private

Definition at line 297 of file cfg.hpp.


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