CACAO
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
cacao::jit::compiler2::SSAConstructionPass Class Reference

SSAConstructionPass. More...

Inheritance diagram for cacao::jit::compiler2::SSAConstructionPass:
cacao::jit::compiler2::Pass cacao::jit::compiler2::memory::ManagerMixin< SSAConstructionPass >

Public Member Functions

Valueread_variable (size_t varindex, size_t bb)
 
 SSAConstructionPass ()
 
virtual bool run (JITData &JD)
 Run the Pass. More...
 
virtual bool verify () const
 Verify the Result. More...
 
virtual PassUsageget_PassUsage (PassUsage &PU) const
 Set the requirements for the pass. More...
 
- Public Member Functions inherited from cacao::jit::compiler2::Pass
 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 ~Pass ()
 Destructor. More...
 

Static Public Attributes

static char ID
 

Private Member Functions

void write_variable (size_t varindex, size_t bb, Value *V)
 
Valueread_variable_recursive (size_t varindex, size_t bb)
 
Valueadd_phi_operands (size_t varindex, PHIInst *phi)
 
Valuetry_remove_trivial_phi (PHIInst *phi)
 
void seal_block (size_t bb)
 
bool try_seal_block (basicblock *bb)
 
void print_current_def () const
 

Private Attributes

MethodM
 
jitdatajd
 
alloc::vector< BeginInst * >::type BB
 
alloc::unordered_map
< BeginInst *, size_t >::type 
beginToIndex
 
alloc::vector< alloc::vector
< Value * >::type >::type 
current_def
 
alloc::vector< alloc::vector
< PHIInst * >::type >::type 
incomplete_phi
 
alloc::vector< alloc::list
< InVarPhis * >::type >::type 
incomplete_in_phi
 
alloc::vector< bool >::type sealed_blocks
 
alloc::vector< bool >::type filled_blocks
 
alloc::vector< Type::TypeID >::type var_type_tbl
 

Additional Inherited Members

- Static Public Member Functions inherited from cacao::jit::compiler2::memory::ManagerMixin< SSAConstructionPass >
static voidoperator new (std::size_t size) throw (std::bad_alloc)
 normal new More...
 
static voidoperator new (std::size_t size, void *ptr) throw ()
 placement new More...
 
static voidoperator 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 voidoperator new[] (std::size_t size) throw (std::bad_alloc)
 normal new[] More...
 
static voidoperator new[] (std::size_t size, void *ptr) throw ()
 placement new[] More...
 
static voidoperator 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...
 

Detailed Description

SSAConstructionPass.

This Pass constructs the compiler2 specific SSA based IR from the ICMD_* style IR used in the baseline compiler.

The approach is based on "Simple and Efficient Construction of Static Singe Assignment Form" by Braun et al. 2013 [1].

Definition at line 52 of file SSAConstructionPass.hpp.

Constructor & Destructor Documentation

cacao::jit::compiler2::SSAConstructionPass::SSAConstructionPass ( )
inline

Definition at line 78 of file SSAConstructionPass.hpp.

Member Function Documentation

Value* cacao::jit::compiler2::SSAConstructionPass::add_phi_operands ( size_t  varindex,
PHIInst phi 
)
private
virtual PassUsage& cacao::jit::compiler2::SSAConstructionPass::get_PassUsage ( PassUsage PU) const
virtual

Set the requirements for the pass.

Reimplemented from cacao::jit::compiler2::Pass.

void cacao::jit::compiler2::SSAConstructionPass::print_current_def ( ) const
private
Value* cacao::jit::compiler2::SSAConstructionPass::read_variable ( size_t  varindex,
size_t  bb 
)
Value* cacao::jit::compiler2::SSAConstructionPass::read_variable_recursive ( size_t  varindex,
size_t  bb 
)
private
virtual bool cacao::jit::compiler2::SSAConstructionPass::run ( JITData JD)
virtual

Run the Pass.

This method implements the compiler pass.

Returns
false if a problem occurred, true otherwise

Implements cacao::jit::compiler2::Pass.

void cacao::jit::compiler2::SSAConstructionPass::seal_block ( size_t  bb)
private
Value* cacao::jit::compiler2::SSAConstructionPass::try_remove_trivial_phi ( PHIInst phi)
private
bool cacao::jit::compiler2::SSAConstructionPass::try_seal_block ( basicblock bb)
private
virtual bool cacao::jit::compiler2::SSAConstructionPass::verify ( ) const
virtual

Verify the Result.

This method is used to verify the result of the pass. It has the same motivation than the assert() statement. It should be only used for debugging purposes and might not be called in release builds.

Reimplemented from cacao::jit::compiler2::Pass.

void cacao::jit::compiler2::SSAConstructionPass::write_variable ( size_t  varindex,
size_t  bb,
Value V 
)
private

Field Documentation

alloc::vector<BeginInst*>::type cacao::jit::compiler2::SSAConstructionPass::BB
private

Definition at line 56 of file SSAConstructionPass.hpp.

alloc::unordered_map<BeginInst*,size_t>::type cacao::jit::compiler2::SSAConstructionPass::beginToIndex
private

Definition at line 57 of file SSAConstructionPass.hpp.

alloc::vector<alloc::vector<Value*>::type >::type cacao::jit::compiler2::SSAConstructionPass::current_def
private

Definition at line 58 of file SSAConstructionPass.hpp.

alloc::vector<bool>::type cacao::jit::compiler2::SSAConstructionPass::filled_blocks
private

Definition at line 66 of file SSAConstructionPass.hpp.

char cacao::jit::compiler2::SSAConstructionPass::ID
static

Definition at line 77 of file SSAConstructionPass.hpp.

alloc::vector<alloc::list<InVarPhis*>::type >::type cacao::jit::compiler2::SSAConstructionPass::incomplete_in_phi
private

Definition at line 62 of file SSAConstructionPass.hpp.

alloc::vector<alloc::vector<PHIInst*>::type >::type cacao::jit::compiler2::SSAConstructionPass::incomplete_phi
private

Definition at line 60 of file SSAConstructionPass.hpp.

jitdata* cacao::jit::compiler2::SSAConstructionPass::jd
private

Definition at line 55 of file SSAConstructionPass.hpp.

Method* cacao::jit::compiler2::SSAConstructionPass::M
private

Definition at line 54 of file SSAConstructionPass.hpp.

alloc::vector<bool>::type cacao::jit::compiler2::SSAConstructionPass::sealed_blocks
private

Definition at line 64 of file SSAConstructionPass.hpp.

alloc::vector<Type::TypeID>::type cacao::jit::compiler2::SSAConstructionPass::var_type_tbl
private

Definition at line 67 of file SSAConstructionPass.hpp.


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