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

NullCheckEliminationPass. More...

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

Public Member Functions

 NullCheckEliminationPass ()
 
virtual bool run (JITData &JD)
 Run the Pass. 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_PassRunner (PassRunner *pr)
 
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 bool is_enabled () const
 Allows concrete passes to enable/disable themselves the way they like. 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...
 

Private Member Functions

bool is_trivially_non_null (Value *objectref)
 
void map_referenes_to_bitpositions ()
 
void prepare_bitvectors ()
 
void perform_null_check_elimination ()
 

Private Attributes

MethodM
 
alloc::unordered_map
< Instruction *, int >::type 
bitpositions
 Maps each object reference to a unique bitvector position. More...
 
alloc::unordered_map
< BeginInst
*, boost::dynamic_bitset
<> >::type 
non_null_references_at_exit
 
alloc::unordered_map
< BeginInst
*, boost::dynamic_bitset
<> >::type 
non_null_references_at_entry
 Holds for each BeginInst the local analysis state in the form of a bitvector. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cacao::jit::compiler2::Pass
template<class T >
static PassInfo::IDTy ID ()
 This template will return a unique ID for each type that it is called with. More...
 
- Static Public Member Functions inherited from cacao::jit::compiler2::memory::ManagerMixin< NullCheckEliminationPass >
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

NullCheckEliminationPass.

Definition at line 47 of file NullCheckEliminationPass.hpp.

Constructor & Destructor Documentation

cacao::jit::compiler2::NullCheckEliminationPass::NullCheckEliminationPass ( )
inline

Definition at line 82 of file NullCheckEliminationPass.hpp.

Member Function Documentation

PassUsage & cacao::jit::compiler2::NullCheckEliminationPass::get_PassUsage ( PassUsage PU) const
virtual

Set the requirements for the pass.

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

Definition at line 212 of file NullCheckEliminationPass.cpp.

bool cacao::jit::compiler2::NullCheckEliminationPass::is_trivially_non_null ( Value objectref)
private

Definition at line 50 of file NullCheckEliminationPass.cpp.

void cacao::jit::compiler2::NullCheckEliminationPass::map_referenes_to_bitpositions ( )
private

Definition at line 67 of file NullCheckEliminationPass.cpp.

void cacao::jit::compiler2::NullCheckEliminationPass::perform_null_check_elimination ( )
private

Definition at line 92 of file NullCheckEliminationPass.cpp.

void cacao::jit::compiler2::NullCheckEliminationPass::prepare_bitvectors ( )
private

Definition at line 78 of file NullCheckEliminationPass.cpp.

bool cacao::jit::compiler2::NullCheckEliminationPass::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.

Definition at line 198 of file NullCheckEliminationPass.cpp.

Field Documentation

alloc::unordered_map<Instruction*,int>::type cacao::jit::compiler2::NullCheckEliminationPass::bitpositions
private

Maps each object reference to a unique bitvector position.

Definition at line 55 of file NullCheckEliminationPass.hpp.

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

Definition at line 50 of file NullCheckEliminationPass.hpp.

alloc::unordered_map<BeginInst*, boost::dynamic_bitset<> >::type cacao::jit::compiler2::NullCheckEliminationPass::non_null_references_at_entry
private

Holds for each BeginInst the local analysis state in the form of a bitvector.

Definition at line 66 of file NullCheckEliminationPass.hpp.

alloc::unordered_map<BeginInst*, boost::dynamic_bitset<> >::type cacao::jit::compiler2::NullCheckEliminationPass::non_null_references_at_exit
private

Definition at line 60 of file NullCheckEliminationPass.hpp.


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