#include <SymAliasSets.hpp>


Classes | |
| class | SymSet |
| class | SymSetIterator |
Public Member Functions | |
| SymAliasSets () | |
| SymAliasSets (const SymAliasSets &other) | |
| copy constructor | |
| ~SymAliasSets () | |
| OA_ptr< SymHandleIterator > | getSymIterator (SymHandle sym) |
| bool | operator== (DataFlow::DataFlowSet &other) const |
| bool | operator!= (DataFlow::DataFlowSet &other) const |
| OA_ptr< DataFlow::DataFlowSet > | clone () |
| void | dump (std::ostream &os, OA_ptr< IRHandlesIRInterface >) |
| void | dump (std::ostream &os) |
| OA_ptr< SymAliasSets > | meet (SymAliasSets &other) |
| void | mergeSyms (SymHandle sym1, SymHandle sym2) |
Static Public Attributes | |
| static const int | SET_ID_NONE = -1 |
Private Member Functions | |
| void | insertSet (OA_ptr< SymSet > pSet) |
| void | replaceSet (int oldSetId, OA_ptr< SymSet > pSet) |
| replace the set with the given set id with the given set | |
| int | getAliasSetId (SymHandle sym) |
| Get unique set id for set that the given symbol maps to. | |
Private Attributes | |
| std::map< int, OA_ptr< SymSet > > | mIdToSymSetMap |
| std::map< SymHandle, int > | mSymToIdMap |
| int | mNextSetId |
Friends | |
| class | SymSetIterator |
This class can be used to store information about the mapping of symbols to invisible symbols. It can be used as a DataFlowSet. If a symbol is not indicated as mapping to the same invisible as another symbol then the default mapping is that the symbol maps to itself.
This class also stores information about which calls contribute to the mapping.
Definition at line 42 of file SymAliasSets.hpp.
| OA::Alias::SymAliasSets::SymAliasSets | ( | ) | [inline] |
Definition at line 48 of file SymAliasSets.hpp.
Referenced by clone().
| OA::Alias::SymAliasSets::SymAliasSets | ( | const SymAliasSets & | other | ) |
copy constructor
Definition at line 29 of file SymAliasSets.cpp.
References OA::Alias::debug, mIdToSymSetMap, mNextSetId, mSymToIdMap, and OA_DEBUG_CTRL_MACRO.
| OA::Alias::SymAliasSets::~SymAliasSets | ( | ) | [inline] |
Definition at line 50 of file SymAliasSets.hpp.
| OA_ptr< DataFlow::DataFlowSet > OA::Alias::SymAliasSets::clone | ( | ) | [virtual] |
Implements OA::DataFlow::DataFlowSet.
Definition at line 92 of file SymAliasSets.cpp.
References SymAliasSets().

| void OA::Alias::SymAliasSets::dump | ( | std::ostream & | os, | |
| OA_ptr< IRHandlesIRInterface > | ir | |||
| ) | [virtual] |
Implements OA::DataFlow::DataFlowSet.
Definition at line 99 of file SymAliasSets.cpp.
References OA::OA_ptr< T >::dump(), and mIdToSymSetMap.

| void OA::Alias::SymAliasSets::dump | ( | std::ostream & | os | ) | [virtual] |
Implements OA::DataFlow::DataFlowSet.
Definition at line 111 of file SymAliasSets.cpp.
References OA::OA_ptr< T >::dump(), mIdToSymSetMap, and mSymToIdMap.

| int OA::Alias::SymAliasSets::getAliasSetId | ( | SymHandle | sym | ) | [private] |
Get unique set id for set that the given symbol maps to.
Definition at line 39 of file SymAliasSets.cpp.
References mSymToIdMap, and SET_ID_NONE.
Referenced by mergeSyms().
| OA_ptr< SymHandleIterator > OA::Alias::SymAliasSets::getSymIterator | ( | SymHandle | sym | ) |
Returns iterator over all formal ref params and globals that are in the same set as the given SymHandle
Definition at line 51 of file SymAliasSets.cpp.
References mIdToSymSetMap, mSymToIdMap, and SymSetIterator.
insert set into datastructure and map all symbols it contains to the set
insert set into datastructure and map all symbols it contains to the set, only used in this code so assuming that pSet doesn't overlap with any existing sets
Definition at line 203 of file SymAliasSets.cpp.
References mIdToSymSetMap, mNextSetId, mSymToIdMap, and SymSetIterator.
Referenced by mergeSyms().
| OA_ptr< SymAliasSets > OA::Alias::SymAliasSets::meet | ( | SymAliasSets & | other | ) |
If two symbols map to the same invisible symbol in even one of the SymAliasSets then they map to the same symbol in the result Does a union of calls that contribute to the two maps.
If there are any SymSets that overlap between the two SymAliasSets then merge those SymSets in the new SymAliasSets data structure.
Definition at line 139 of file SymAliasSets.cpp.
References OA::Alias::debug, OA::DataFlow::IRHandleDataFlowSet< T >::empty(), mIdToSymSetMap, and OA::DataFlow::IRHandleDataFlowSet< T >::setIntersect().

indicate the two formal params and/or globals may alias each other and therefore should map to same set
indicate the two formal params and/or globals may alias each other at a particular call therefore should be in same map
Definition at line 235 of file SymAliasSets.cpp.
References getAliasSetId(), insertSet(), mIdToSymSetMap, mSymToIdMap, SET_ID_NONE, and SymSetIterator.

| bool OA::Alias::SymAliasSets::operator!= | ( | DataFlow::DataFlowSet & | other | ) | const [virtual] |
Implements OA::DataFlow::DataFlowSet.
Definition at line 87 of file SymAliasSets.cpp.
| bool OA::Alias::SymAliasSets::operator== | ( | DataFlow::DataFlowSet & | other | ) | const [virtual] |
Implements OA::DataFlow::DataFlowSet.
Definition at line 75 of file SymAliasSets.cpp.
References mSymToIdMap.
replace the set with the given set id with the given set
Definition at line 219 of file SymAliasSets.cpp.
References mIdToSymSetMap, mSymToIdMap, and SymSetIterator.
friend class SymSetIterator [friend] |
Definition at line 44 of file SymAliasSets.hpp.
Referenced by getSymIterator(), insertSet(), mergeSyms(), and replaceSet().
std::map<int,OA_ptr<SymSet> > OA::Alias::SymAliasSets::mIdToSymSetMap [private] |
Definition at line 93 of file SymAliasSets.hpp.
Referenced by dump(), getSymIterator(), insertSet(), meet(), mergeSyms(), replaceSet(), and SymAliasSets().
int OA::Alias::SymAliasSets::mNextSetId [private] |
Definition at line 96 of file SymAliasSets.hpp.
Referenced by insertSet(), and SymAliasSets().
std::map<SymHandle,int> OA::Alias::SymAliasSets::mSymToIdMap [private] |
Definition at line 95 of file SymAliasSets.hpp.
Referenced by dump(), getAliasSetId(), getSymIterator(), insertSet(), mergeSyms(), operator==(), replaceSet(), and SymAliasSets().
const int OA::Alias::SymAliasSets::SET_ID_NONE = -1 [static] |
Definition at line 52 of file SymAliasSets.hpp.
Referenced by getAliasSetId(), and mergeSyms().
1.7.1