Thorin 1.9.0
The Higher ORder INtermediate representation
|
A Control-Flow Graph. More...
#include <thorin/analyses/cfg.h>
Public Types | |
template<class Value > | |
using | Map = IndexMap< CFG< forward >, const CFNode *, Value > |
using | Set = IndexSet< CFG< forward >, const CFNode * > |
Public Member Functions | |
CFG (const CFG &)=delete | |
CFG & | operator= (CFG)=delete |
CFG (const CFA &) | |
const CFA & | cfa () const |
size_t | size () const |
const CFNodes & | preds (const CFNode *n) const |
const CFNodes & | succs (const CFNode *n) const |
const CFNodes & | preds (Def *mut) const |
const CFNodes & | succs (Def *mut) const |
size_t | num_preds (const CFNode *n) const |
size_t | num_succs (const CFNode *n) const |
size_t | num_preds (Def *mut) const |
size_t | num_succs (Def *mut) const |
const CFNode * | entry () const |
const CFNode * | exit () const |
auto | reverse_post_order () const |
auto | post_order () const |
const CFNode * | reverse_post_order (size_t i) const |
Maps from reverse post-order index to CFNode. | |
const CFNode * | post_order (size_t i) const |
Maps from post-order index to CFNode. | |
const CFNode * | operator[] (Def *mut) const |
Maps from mut to CFNode. | |
const DomTreeBase< forward > & | domtree () const |
const LoopTree< forward > & | looptree () const |
const DomFrontierBase< forward > & | domfrontier () const |
Static Public Member Functions | |
static size_t | index (const CFNode *n) |
A Control-Flow Graph.
A small wrapper for the information obtained by a CFA. The template parameter forward
determines the direction of the edges:
true
means a conventional CFG.using thorin::CFG< forward >::Map = IndexMap<CFG<forward>, const CFNode*, Value> |
using thorin::CFG< forward >::Set = IndexSet<CFG<forward>, const CFNode*> |
|
delete |
|
explicit |
Definition at line 158 of file cfg.cpp.
References thorin::CFG< forward >::entry(), thorin::CFG< forward >::index(), and thorin::CFG< forward >::size().
|
inline |
Definition at line 126 of file cfg.h.
Referenced by thorin::CFG< forward >::entry(), thorin::CFG< forward >::exit(), thorin::CFG< forward >::num_preds(), thorin::CFG< forward >::num_succs(), thorin::CFG< forward >::operator[](), thorin::CFG< forward >::preds(), thorin::CFG< forward >::size(), and thorin::CFG< forward >::succs().
const DomFrontierBase< forward > & thorin::CFG< forward >::domfrontier | ( | ) | const |
Definition at line 182 of file cfg.cpp.
References thorin::lazy_init().
const DomTreeBase< forward > & thorin::CFG< forward >::domtree | ( | ) | const |
Definition at line 180 of file cfg.cpp.
References thorin::lazy_init().
|
inline |
Definition at line 136 of file cfg.h.
References thorin::CFG< forward >::cfa().
Referenced by thorin::CFG< forward >::CFG().
|
inline |
Definition at line 137 of file cfg.h.
References thorin::CFG< forward >::cfa().
|
inlinestatic |
Definition at line 150 of file cfg.h.
Referenced by thorin::CFG< forward >::CFG().
const LoopTree< forward > & thorin::CFG< forward >::looptree | ( | ) | const |
Definition at line 181 of file cfg.cpp.
References thorin::lazy_init().
Referenced by thorin::Scheduler::smart().
|
inline |
Definition at line 132 of file cfg.h.
References thorin::CFG< forward >::preds().
|
inline |
Definition at line 134 of file cfg.h.
References thorin::CFG< forward >::cfa(), and thorin::CFG< forward >::num_preds().
Referenced by thorin::CFG< forward >::num_preds().
|
inline |
Definition at line 133 of file cfg.h.
References thorin::CFG< forward >::succs().
|
inline |
Definition at line 135 of file cfg.h.
References thorin::CFG< forward >::cfa(), and thorin::CFG< forward >::num_succs().
Referenced by thorin::CFG< forward >::num_succs().
|
delete |
|
inline |
Maps from mut
to CFNode.
Definition at line 145 of file cfg.h.
References thorin::CFG< forward >::cfa().
|
inline |
|
inline |
Maps from post-order index to CFNode.
Definition at line 144 of file cfg.h.
References thorin::CFG< forward >::size().
const CFNodes & thorin::CFG< forward >::preds | ( | const CFNode * | n | ) | const |
Definition at line 178 of file cfg.cpp.
Referenced by thorin::CFG< forward >::num_preds().
|
inline |
Definition at line 130 of file cfg.h.
References thorin::CFG< forward >::cfa(), and thorin::CFG< forward >::preds().
Referenced by thorin::CFG< forward >::preds().
|
inline |
Definition at line 139 of file cfg.h.
Referenced by thorin::Scheduler::schedule(), and thorin::Scheduler::Scheduler().
|
inline |
|
inline |
Definition at line 127 of file cfg.h.
References thorin::CFG< forward >::cfa(), and thorin::CFA::size().
Referenced by thorin::CFG< forward >::CFG(), and thorin::CFG< forward >::post_order().
const CFNodes & thorin::CFG< forward >::succs | ( | const CFNode * | n | ) | const |
Definition at line 179 of file cfg.cpp.
Referenced by thorin::CFG< forward >::num_succs().
|
inline |
Definition at line 131 of file cfg.h.
References thorin::CFG< forward >::cfa(), and thorin::CFG< forward >::succs().
Referenced by thorin::CFG< forward >::succs().