CACAO
|
Calculate the Dominator Tree. More...
Public Member Functions | |
DominatorPass () | |
virtual bool | run (JITData &JD) |
Run the Pass. More... | |
virtual PassUsage & | get_PassUsage (PassUsage &PU) const |
Set the requirements for the pass. More... | |
![]() | |
Pass () | |
void | set_PassManager (PassManager *PM) |
template<class _PassClass > | |
_PassClass * | get_Pass () const |
Get the result of a previous compiler pass. More... | |
template<class _PassClass > | |
_PassClass * | get_Pass_if_available () const |
Get the result of a previous compiler pass. More... | |
virtual void | initialize () |
Initialize the Pass. More... | |
virtual void | finalize () |
Finalize the Pass. More... | |
virtual bool | verify () const |
Verify the Result. More... | |
virtual | ~Pass () |
Destructor. More... | |
![]() | |
bool | dominates (NodeTy *a, NodeTy *b) const |
True if a dominates b. More... | |
bool | is_dominated_by (NodeTy *b, NodeTy *a) const |
True if b is dominated by b. More... | |
NodeTy * | get_idominator (NodeTy *a) const |
Get the immediate dominator. More... | |
NodeTy * | find_nearest_common_dom (NodeTy *a, NodeTy *b) const |
Find the nearest common dominator. More... | |
int | depth (NodeTy *node) const |
Depth of a tree node. More... | |
Static Public Attributes | |
static char | ID = 0 |
Private Types | |
typedef BeginInst | NodeTy |
typedef alloc::set< NodeTy * > ::type | NodeListTy |
typedef alloc::map< NodeTy *, NodeListTy >::type | NodeListMapTy |
typedef alloc::vector< NodeTy * > ::type | NodeMapTy |
typedef alloc::map< NodeTy *, int >::type | IndexMapTy |
typedef alloc::map< NodeTy *, NodeTy * >::type | EdgeMapTy |
Private Member Functions | |
NodeListTy & | succ (NodeTy *v, NodeListTy &list) |
void | DFS (NodeTy *v) |
void | Link (NodeTy *v, NodeTy *w) |
NodeTy * | Eval (NodeTy *v) |
void | Compress (NodeTy *v) |
Private Attributes | |
EdgeMapTy | parent |
NodeListMapTy | pred |
IndexMapTy | semi |
NodeMapTy | vertex |
NodeListMapTy | bucket |
int | n |
EdgeMapTy | ancestor |
EdgeMapTy | label |
Additional Inherited Members | |
![]() | |
typedef BeginInst | NodeTy |
typedef alloc::map< NodeTy *, NodeTy * >::type | EdgeMapTy |
![]() | |
static void * | operator new (std::size_t size) throw (std::bad_alloc) |
normal new More... | |
static void * | operator new (std::size_t size, void *ptr) throw () |
placement new More... | |
static void * | operator new (std::size_t size, const std::nothrow_t &nt) throw () |
nothrow new More... | |
static void | operator delete (void *pMemory) throw () |
normal delete More... | |
static void | operator delete (void *pMemory, void *ptr) throw () |
placement delete More... | |
static void | operator delete (void *pMemory, const std::nothrow_t &) throw () |
nothrow delete More... | |
static void * | operator new[] (std::size_t size) throw (std::bad_alloc) |
normal new[] More... | |
static void * | operator new[] (std::size_t size, void *ptr) throw () |
placement new[] More... | |
static void * | operator new[] (std::size_t size, const std::nothrow_t &nt) throw () |
nothrow new[] More... | |
static void | operator delete[] (void *pMemory) throw () |
normal delete[] More... | |
static void | operator delete[] (void *pMemory, void *ptr) throw () |
placement delete[] More... | |
static void | operator delete[] (void *pMemory, const std::nothrow_t &) throw () |
nothrow delete[] More... | |
![]() | |
EdgeMapTy | dom |
Calculate the Dominator Tree.
This Pass implements the algorithm proposed by Lengauer and Tarjan. The variable and function are named accoring to the paper. Currently the 'simple' version is implemented. The 'sophisticated' version is left for future work.
A Fast Algorithm for Finding Dominators in a Flowgraph, by Lengauer and Tarjan, 1979 [4].
Definition at line 103 of file DominatorPass.hpp.
|
private |
Definition at line 110 of file DominatorPass.hpp.
|
private |
Definition at line 109 of file DominatorPass.hpp.
|
private |
Definition at line 107 of file DominatorPass.hpp.
|
private |
Definition at line 106 of file DominatorPass.hpp.
|
private |
Definition at line 108 of file DominatorPass.hpp.
|
private |
Definition at line 105 of file DominatorPass.hpp.
|
inline |
Definition at line 130 of file DominatorPass.hpp.
Definition at line 121 of file DominatorPass.cpp.
Definition at line 89 of file DominatorPass.cpp.
|
private |
Definition at line 113 of file DominatorPass.cpp.
Set the requirements for the pass.
Reimplemented from cacao::jit::compiler2::Pass.
Definition at line 207 of file DominatorPass.cpp.
Definition at line 109 of file DominatorPass.cpp.
|
virtual |
Run the Pass.
This method implements the compiler pass.
Implements cacao::jit::compiler2::Pass.
Definition at line 133 of file DominatorPass.cpp.
|
private |
Definition at line 79 of file DominatorPass.cpp.
|
private |
Definition at line 119 of file DominatorPass.hpp.
|
private |
Definition at line 116 of file DominatorPass.hpp.
|
static |
Definition at line 129 of file DominatorPass.hpp.
|
private |
Definition at line 120 of file DominatorPass.hpp.
|
private |
Definition at line 117 of file DominatorPass.hpp.
|
private |
Definition at line 112 of file DominatorPass.hpp.
|
private |
Definition at line 113 of file DominatorPass.hpp.
|
private |
Definition at line 114 of file DominatorPass.hpp.
|
private |
Definition at line 115 of file DominatorPass.hpp.