CACAO
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
cacao::jit::compiler2::PassUsage Class Reference

Stores the interdependencies of a pass. More...

Public Types

typedef alloc::unordered_set
< PassInfo::IDTy >::type 
PIIDSet
 
typedef PIIDSet::const_iterator const_iterator
 

Public Member Functions

 PassUsage ()
 
template<class PassName >
void add_requires ()
 PassName is required. More...
 
void add_requires (PassInfo::IDTy id)
 
template<class PassName >
void add_destroys ()
 PassName will be invalidated. More...
 
void add_destroys (PassInfo::IDTy id)
 
template<class PassName >
void add_modifies ()
 PassName will be modified. More...
 
void add_modifies (PassInfo::IDTy id)
 
template<class PassName >
void add_run_before ()
 Run before PassName. More...
 
void add_run_before (PassInfo::IDTy id)
 
template<class PassName >
void add_schedule_before ()
 Schedule before PassName. More...
 
void add_schedule_before (PassInfo::IDTy id)
 
template<class PassName >
void add_schedule_after ()
 Schedule after PassName. More...
 
void add_schedule_after (PassInfo::IDTy id)
 
const_iterator destroys_begin () const
 
const_iterator destroys_end () const
 
const_iterator modifies_begin () const
 
const_iterator modifies_end () const
 
const_iterator requires_begin () const
 
const_iterator requires_end () const
 
const_iterator run_before_begin () const
 
const_iterator run_before_end () const
 
const_iterator schedule_after_begin () const
 
const_iterator schedule_after_end () const
 
const_iterator schedule_before_begin () const
 
const_iterator schedule_before_end () const
 

Private Member Functions

bool is_required (char &ID) const
 

Private Attributes

PIIDSet requires
 
PIIDSet destroys
 
PIIDSet modifies
 
PIIDSet run_before
 
PIIDSet schedule_after
 
PIIDSet schedule_before
 

Friends

class Pass
 

Detailed Description

Stores the interdependencies of a pass.

add_modifies and add_destroys can be use to invalidate other passes.

The others are used to control the placement of a pass.

add_requires<PassName>() and add_schedule_after<>(PassName) assert that the pass PassName must be scheduled before the current pass. The first version also ensures that PassName is up to date. It also allows the retrieval of the info by using get_Pass<PassName>().

add_run_before<PassName> and add_schedule_before<PassName>() ensure that the current pass is scheduled before PassName. The first version also enforces that the current pass is up to date. add_run_before(add_schedule_before) is the inverse operation of add_requires(add_schedule_after).

Definition at line 55 of file PassUsage.hpp.

Member Typedef Documentation

Definition at line 58 of file PassUsage.hpp.

Definition at line 57 of file PassUsage.hpp.

Constructor & Destructor Documentation

cacao::jit::compiler2::PassUsage::PassUsage ( )
inline

Definition at line 72 of file PassUsage.hpp.

Member Function Documentation

template<class PassName >
void cacao::jit::compiler2::PassUsage::add_destroys ( )
inline

PassName will be invalidated.

Definition at line 89 of file PassUsage.hpp.

void cacao::jit::compiler2::PassUsage::add_destroys ( PassInfo::IDTy  id)
inline

Definition at line 92 of file PassUsage.hpp.

template<class PassName >
void cacao::jit::compiler2::PassUsage::add_modifies ( )
inline

PassName will be modified.

All passed depending on PassName are invalidated.

Definition at line 100 of file PassUsage.hpp.

void cacao::jit::compiler2::PassUsage::add_modifies ( PassInfo::IDTy  id)
inline

Definition at line 103 of file PassUsage.hpp.

template<class PassName >
void cacao::jit::compiler2::PassUsage::add_requires ( )
inline

PassName is required.

Definition at line 78 of file PassUsage.hpp.

void cacao::jit::compiler2::PassUsage::add_requires ( PassInfo::IDTy  id)
inline

Definition at line 81 of file PassUsage.hpp.

template<class PassName >
void cacao::jit::compiler2::PassUsage::add_run_before ( )
inline

Run before PassName.

This enforces that the current pass is up to date before running PassName.

Definition at line 113 of file PassUsage.hpp.

void cacao::jit::compiler2::PassUsage::add_run_before ( PassInfo::IDTy  id)
inline

Definition at line 116 of file PassUsage.hpp.

template<class PassName >
void cacao::jit::compiler2::PassUsage::add_schedule_after ( )
inline

Schedule after PassName.

Like add_requires but does not rerun PassName if not up to date. Also, it is not allowed the use get_Pass<PassName>(). This does not force a pass to be scheduled at all! It is only used to express schedule dependencies.

Definition at line 143 of file PassUsage.hpp.

void cacao::jit::compiler2::PassUsage::add_schedule_after ( PassInfo::IDTy  id)
inline

Definition at line 146 of file PassUsage.hpp.

template<class PassName >
void cacao::jit::compiler2::PassUsage::add_schedule_before ( )
inline

Schedule before PassName.

This ensures that the current pass has been executed at least once. It is not needed to be up to date.

Definition at line 127 of file PassUsage.hpp.

void cacao::jit::compiler2::PassUsage::add_schedule_before ( PassInfo::IDTy  id)
inline

Definition at line 130 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::destroys_begin ( ) const
inline

Definition at line 150 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::destroys_end ( ) const
inline

Definition at line 151 of file PassUsage.hpp.

bool cacao::jit::compiler2::PassUsage::is_required ( char &  ID) const
inlineprivate

Definition at line 67 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::modifies_begin ( ) const
inline

Definition at line 153 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::modifies_end ( ) const
inline

Definition at line 154 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::requires_begin ( ) const
inline

Definition at line 156 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::requires_end ( ) const
inline

Definition at line 157 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::run_before_begin ( ) const
inline

Definition at line 159 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::run_before_end ( ) const
inline

Definition at line 160 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::schedule_after_begin ( ) const
inline

Definition at line 162 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::schedule_after_end ( ) const
inline

Definition at line 163 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::schedule_before_begin ( ) const
inline

Definition at line 165 of file PassUsage.hpp.

const_iterator cacao::jit::compiler2::PassUsage::schedule_before_end ( ) const
inline

Definition at line 166 of file PassUsage.hpp.

Friends And Related Function Documentation

friend class Pass
friend

Definition at line 168 of file PassUsage.hpp.

Field Documentation

PIIDSet cacao::jit::compiler2::PassUsage::destroys
private

Definition at line 61 of file PassUsage.hpp.

PIIDSet cacao::jit::compiler2::PassUsage::modifies
private

Definition at line 62 of file PassUsage.hpp.

PIIDSet cacao::jit::compiler2::PassUsage::requires
private

Definition at line 60 of file PassUsage.hpp.

PIIDSet cacao::jit::compiler2::PassUsage::run_before
private

Definition at line 63 of file PassUsage.hpp.

PIIDSet cacao::jit::compiler2::PassUsage::schedule_after
private

Definition at line 64 of file PassUsage.hpp.

PIIDSet cacao::jit::compiler2::PassUsage::schedule_before
private

Definition at line 65 of file PassUsage.hpp.


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