OA::Activity::DepDFSet Class Reference

#include <DepDFSet.hpp>

Inheritance diagram for OA::Activity::DepDFSet:
Inheritance graph
[legend]
Collaboration diagram for OA::Activity::DepDFSet:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::map< OA_ptr
< Location >, OA_ptr
< DataFlow::LocDFSet > > 
LocToLocDFSetMap

Public Member Functions

 DepDFSet ()
 default constructor
 DepDFSet (const DepDFSet &other)
 copy constructor
 ~DepDFSet ()
DepDFSetoperator= (const DepDFSet &other)
 assignment
OA_ptr< DataFlow::DataFlowSetclone ()
bool operator== (DataFlow::DataFlowSet &other) const
bool operator!= (DataFlow::DataFlowSet &other) const
DepDFSetsetUnion (DataFlow::DataFlowSet &other)
 unions this DepDFSet with other and stores result in this
DepDFSetcompose (DataFlow::DataFlowSet &other)
 If <a,b> in *this and <b,c> in other then add <a,c> to *this.
OA_ptr< DepIteratorgetDepIterator () const
 get an iterator over deps
OA_ptr< LocIteratorgetDefsIterator (const OA_ptr< Location > use) const
OA_ptr< LocIteratorgetUsesIterator (OA_ptr< Location > def) const
void output (OA::IRHandlesIRInterface &ir)
 intersects this DepDFSet with other into self
void dump (std::ostream &os, OA_ptr< IRHandlesIRInterface > ir)
void dump (std::ostream &os)
void dump (std::ostream &os) const
void insertDep (OA_ptr< Location > use, OA_ptr< Location > def)
void removeImplicitDep (OA_ptr< Location > use, OA_ptr< Location > def)
bool isImplicitRemoved (const OA_ptr< Location > loc) const

Private Attributes

OA_ptr< DataFlow::LocDFSetmImplicitRemoves
LocToLocDFSetMap mUseToDefsMap
LocToLocDFSetMap mDefToUsesMap
OA_ptr< DataFlow::LocDFSetmUses
OA_ptr< DataFlow::LocDFSetmDefs

Friends

class DepIterator

Detailed Description

A set of differentiable dependence pairs, <useLoc,defLoc>. Dependences to self are implicit unless removed with removeDep.

Definition at line 36 of file DepDFSet.hpp.


Member Typedef Documentation

Definition at line 110 of file DepDFSet.hpp.


Constructor & Destructor Documentation

OA::Activity::DepDFSet::DepDFSet (  ) 

default constructor

Definition at line 24 of file DepDFSet.cpp.

References OA::Activity::debug, mDefs, mImplicitRemoves, mUses, and OA_DEBUG_CTRL_MACRO.

Referenced by clone(), and getDepIterator().

OA::Activity::DepDFSet::DepDFSet ( const DepDFSet other  ) 

copy constructor

Definition at line 33 of file DepDFSet.cpp.

References mDefs, mDefToUsesMap, mImplicitRemoves, mUses, and mUseToDefsMap.

OA::Activity::DepDFSet::~DepDFSet (  )  [inline]

Definition at line 42 of file DepDFSet.hpp.


Member Function Documentation

OA_ptr< DataFlow::DataFlowSet > OA::Activity::DepDFSet::clone (  )  [virtual]

Implements OA::DataFlow::DataFlowSet.

Definition at line 58 of file DepDFSet.cpp.

References DepDFSet().

Referenced by OA::Activity::ManagerDepStandard::meet().

Here is the call graph for this function:

DepDFSet & OA::Activity::DepDFSet::compose ( DataFlow::DataFlowSet other  ) 

If <a,b> in *this and <b,c> in other then add <a,c> to *this.

Composes dep pairs in this with other DepDFSet and stores result in this.

Examples: let <b,b> has been removed from set2 with removeDep this other result set1 set2 <use1,def1> <use2,def2> <a,b> <b,a> <a,a> explicitly represented but marked as implicitly blocked <a,b> shouldn't have <a,b> unless <b,b> is explicit in set 2 Unions mImplicitRemoves for this and other

Assumes that getDefsIterator and getUsesIterator handles the mImplicitRemoves correctly. In other words those iterators will return reflexive uses and defs unless the given parameters overlap with something in the implicitRemoves list.

Definition at line 383 of file DepDFSet.cpp.

References OA::Activity::debug, OA::OA_ptr< T >::dump(), dump(), getDefsIterator(), getUsesIterator(), mDefToUsesMap, mImplicitRemoves, mUseToDefsMap, and OA::OA_ptr< T >::ptrEqual().

Here is the call graph for this function:

void OA::Activity::DepDFSet::dump ( std::ostream &  os  )  const

Definition at line 590 of file DepDFSet.cpp.

References OA::OA_ptr< T >::dump(), mDefs, mDefToUsesMap, mImplicitRemoves, mUses, and mUseToDefsMap.

Here is the call graph for this function:

void OA::Activity::DepDFSet::dump ( std::ostream &  os  )  [virtual]

A use or def must be in both for them to be in a result. In the sets, an intersection is done as well.

FIXME: this isn't needed right now so not implemented

Implements OA::DataFlow::DataFlowSet.

Definition at line 540 of file DepDFSet.cpp.

References OA::OA_ptr< T >::dump(), mDefs, mDefToUsesMap, mImplicitRemoves, mUses, and mUseToDefsMap.

Here is the call graph for this function:

void OA::Activity::DepDFSet::dump ( std::ostream &  os,
OA_ptr< IRHandlesIRInterface ir 
) [virtual]

Implements OA::DataFlow::DataFlowSet.

Definition at line 642 of file DepDFSet.cpp.

References OA::OA_ptr< T >::dump(), mDefs, mDefToUsesMap, mImplicitRemoves, mUses, and mUseToDefsMap.

Referenced by compose(), and OA::Activity::ManagerDepStandard::meet().

Here is the call graph for this function:

OA_ptr< LocIterator > OA::Activity::DepDFSet::getDefsIterator ( const OA_ptr< Location use  )  const

get an iterator over locations that depend on the given differentiable use

Definition at line 199 of file DepDFSet.cpp.

References mImplicitRemoves, mUses, and mUseToDefsMap.

Referenced by compose().

OA_ptr< DepIterator > OA::Activity::DepDFSet::getDepIterator (  )  const

get an iterator over deps

This routine generates a new DepDFSet based of the current one but with the implicit pairs included.

Definition at line 187 of file DepDFSet.cpp.

References DepDFSet(), and DepIterator.

Here is the call graph for this function:

OA_ptr< LocIterator > OA::Activity::DepDFSet::getUsesIterator ( OA_ptr< Location def  )  const

get an iterator over differentiable locations that the given def depends on

Definition at line 252 of file DepDFSet.cpp.

References OA::Activity::debug, OA::OA_ptr< T >::dump(), mDefs, mDefToUsesMap, and mImplicitRemoves.

Referenced by compose().

Here is the call graph for this function:

void OA::Activity::DepDFSet::insertDep ( OA_ptr< Location use,
OA_ptr< Location def 
)

Inserts a dep pair <use,def> into the set of Deps.

The reflexive pairs (eg. <a,a>) are implicitly assumed in the datastructure unless they have been explicitly removed with removeImplicitDep. If they have, calling this routine will take them out of removeImplicitDep. This comes about when a statement such as (a = a + b) occurs. a still depends on itself because it is on the rhs and lhs.

Definition at line 768 of file DepDFSet.cpp.

References mDefs, mDefToUsesMap, mImplicitRemoves, mUses, and mUseToDefsMap.

bool OA::Activity::DepDFSet::isImplicitRemoved ( const OA_ptr< Location loc  )  const

helper function that determines if the given location overlaps with anything in the set of locations whose implicit pair loc,loc has been killed due to a must def

helper function that determines if the given location has been killed due to a must def

Definition at line 360 of file DepDFSet.cpp.

References mImplicitRemoves.

bool OA::Activity::DepDFSet::operator!= ( DataFlow::DataFlowSet other  )  const

Definition at line 139 of file DepDFSet.cpp.

References OA::Activity::debug.

DepDFSet & OA::Activity::DepDFSet::operator= ( const DepDFSet other  ) 

assignment

Definition at line 43 of file DepDFSet.cpp.

References mDefs, mDefToUsesMap, mImplicitRemoves, mUses, and mUseToDefsMap.

bool OA::Activity::DepDFSet::operator== ( DataFlow::DataFlowSet other  )  const

Definition at line 65 of file DepDFSet.cpp.

References OA::Activity::debug, mDefToUsesMap, mImplicitRemoves, and mUseToDefsMap.

void OA::Activity::DepDFSet::output ( OA::IRHandlesIRInterface ir  )  [virtual]

intersects this DepDFSet with other into self

Implements OA::Annotation.

Definition at line 693 of file DepDFSet.cpp.

References OA::indt(), mDefs, mDefToUsesMap, mImplicitRemoves, mUses, mUseToDefsMap, and OA::Annotation::sOutBuild.

Here is the call graph for this function:

void OA::Activity::DepDFSet::removeImplicitDep ( OA_ptr< Location use,
OA_ptr< Location def 
)

needed to indicate when implicit reflexive pairs (eg. <a,a>) are not in the Dep set due to a must define of a

Must allow removeImplicitDep and insertDep to be commutative on DepDFSet. Made possible by taking things out of implicitRemoves if it gets added explicitly.

Definition at line 794 of file DepDFSet.cpp.

References mImplicitRemoves.

DepDFSet & OA::Activity::DepDFSet::setUnion ( DataFlow::DataFlowSet other  ) 

unions this DepDFSet with other and stores result in this

Does a union of all dep pairs and stores the result in this.

Definition at line 310 of file DepDFSet.cpp.

References OA::Activity::debug, mDefs, mDefToUsesMap, mImplicitRemoves, mUses, and mUseToDefsMap.

Referenced by OA::Activity::ManagerInterDep::meet().


Friends And Related Function Documentation

friend class DepIterator [friend]

helper function for iterators, makes all implicit deps explicit except those that have been removed explicitly

Definition at line 124 of file DepDFSet.hpp.

Referenced by getDepIterator().


Member Data Documentation

Definition at line 138 of file DepDFSet.hpp.

Referenced by DepDFSet(), dump(), getUsesIterator(), insertDep(), operator=(), output(), and setUnion().

Definition at line 137 of file DepDFSet.hpp.

Referenced by DepDFSet(), dump(), getDefsIterator(), insertDep(), operator=(), output(), and setUnion().


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

Generated on Sat Oct 31 05:29:06 2009 for OpenAnalysis by  doxygen 1.6.1