LLVM API Documentation
#include <DSGraph.h>
Collaboration diagram for llvm::DSScalarMap:
Public Types | |
typedef ValueMapTy::const_iterator | const_iterator |
typedef ValueMapTy::iterator | iterator |
typedef GlobalSetTy::const_iterator | global_iterator |
Public Member Functions | |
DSScalarMap (EquivalenceClasses< GlobalValue * > &ECs) | |
EquivalenceClasses< GlobalValue * > & | getGlobalECs () const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
GlobalValue * | getLeaderForGlobal (GlobalValue *GV) const |
iterator | find (Value *V) |
const_iterator | find (Value *V) const |
DSNodeHandle & | getRawEntryRef (Value *V) |
unsigned | count (Value *V) const |
void | erase (Value *V) |
void | eraseIfExists (Value *V) |
void | replaceScalar (Value *Old, Value *New) |
void | copyScalarIfExists (Value *Old, Value *New) |
DSNodeHandle & | operator[] (Value *V) |
void | erase (iterator I) |
void | clear () |
void | spliceFrom (DSScalarMap &RHS) |
global_iterator | global_begin () const |
global_iterator | global_end () const |
unsigned | global_size () const |
unsigned | global_count (GlobalValue *GV) const |
This class is crucial to the efficiency of DSA with some large SCC's. In these cases, the cost of iterating over the scalar map dominates the cost of DSA. In all of these cases, the DSA phase is really trying to identify globals or unique node handles active in the function.
Definition at line 38 of file DSGraph.h.
typedef ValueMapTy::const_iterator llvm::DSScalarMap::const_iterator |
typedef GlobalSetTy::const_iterator llvm::DSScalarMap::global_iterator |
llvm::DSScalarMap::DSScalarMap | ( | EquivalenceClasses< GlobalValue * > & | ECs | ) | [inline] |
const_iterator llvm::DSScalarMap::begin | ( | ) | const [inline] |
iterator llvm::DSScalarMap::begin | ( | ) | [inline] |
Definition at line 55 of file DSGraph.h.
Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::AssertGraphOK(), llvm::DSGraph::cloneInto(), llvm::DSGraph::removeDeadNodes(), and llvm::DSGraph::removeTriviallyDeadNodes().
void llvm::DSScalarMap::clear | ( | ) | [inline] |
unsigned llvm::DSScalarMap::count | ( | Value * | V | ) | const [inline] |
const_iterator llvm::DSScalarMap::end | ( | ) | const [inline] |
iterator llvm::DSScalarMap::end | ( | ) | [inline] |
Definition at line 56 of file DSGraph.h.
Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::AssertGraphOK(), llvm::DSGraph::cloneInto(), copyScalarIfExists(), eraseIfExists(), llvm::DSGraph::getNodeForValue(), llvm::DSGraph::removeDeadNodes(), llvm::DSGraph::removeTriviallyDeadNodes(), and replaceScalar().
void llvm::DSScalarMap::erase | ( | iterator | I | ) | [inline] |
void llvm::DSScalarMap::erase | ( | Value * | V | ) | [inline] |
Definition at line 107 of file DSGraph.h.
References V.
Referenced by BuildGlobalECs(), EliminateUsesOfECGlobals(), eraseIfExists(), llvm::DSGraph::removeDeadNodes(), llvm::DSGraph::removeTriviallyDeadNodes(), and replaceScalar().
void llvm::DSScalarMap::eraseIfExists | ( | Value * | V | ) | [inline] |
const_iterator llvm::DSScalarMap::find | ( | Value * | V | ) | const [inline] |
Definition at line 67 of file DSGraph.h.
References getLeaderForGlobal(), GV, I, and V.
Referenced by llvm::DSNode::assertOK(), BuildGlobalECs(), copyScalarIfExists(), eraseIfExists(), llvm::DSGraph::getNodeForValue(), llvm::DSGraph::removeDeadNodes(), replaceScalar(), and llvm::TDDataStructures::runOnModule().
EquivalenceClasses<GlobalValue*>& llvm::DSScalarMap::getGlobalECs | ( | ) | const [inline] |
Definition at line 49 of file DSGraph.h.
Referenced by BuildGlobalECs(), EliminateUsesOfECGlobals(), and llvm::DSGraph::getGlobalECs().
GlobalValue* llvm::DSScalarMap::getLeaderForGlobal | ( | GlobalValue * | GV | ) | const [inline] |
DSNodeHandle& llvm::DSScalarMap::getRawEntryRef | ( | Value * | V | ) | [inline] |
getRawEntryRef - This method can be used by clients that are aware of the global value equivalence class in effect.
Definition at line 96 of file DSGraph.h.
Referenced by llvm::DSGraph::cloneInto().
global_iterator llvm::DSScalarMap::global_begin | ( | ) | const [inline] |
Definition at line 164 of file DSGraph.h.
Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::computeCalleeCallerMapping(), llvm::DSGraph::computeGToGGMapping(), llvm::DSGraph::DSGraph(), EliminateUsesOfECGlobals(), getCaption(), llvm::DSGraph::markIncompleteNodes(), llvm::DSGraph::mergeInGraph(), and llvm::TDDataStructures::runOnModule().
unsigned llvm::DSScalarMap::global_count | ( | GlobalValue * | GV | ) | const [inline] |
Definition at line 167 of file DSGraph.h.
References GV.
Referenced by llvm::DSNode::assertOK(), llvm::DSGraph::computeCalleeCallerMapping(), and EliminateUsesOfECGlobals().
global_iterator llvm::DSScalarMap::global_end | ( | ) | const [inline] |
Definition at line 165 of file DSGraph.h.
Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::computeCalleeCallerMapping(), llvm::DSGraph::computeGToGGMapping(), llvm::DSGraph::DSGraph(), EliminateUsesOfECGlobals(), getCaption(), llvm::DSGraph::markIncompleteNodes(), llvm::DSGraph::mergeInGraph(), and llvm::TDDataStructures::runOnModule().
unsigned llvm::DSScalarMap::global_size | ( | ) | const [inline] |
Definition at line 166 of file DSGraph.h.
Referenced by llvm::DSGraph::computeCalleeCallerMapping().
DSNodeHandle& llvm::DSScalarMap::operator[] | ( | Value * | V | ) | [inline] |
void DSScalarMap::spliceFrom | ( | DSScalarMap & | RHS | ) |
spliceFrom - Copy all entries from RHS, then clear RHS.
Definition at line 1373 of file DataStructure.cpp.
References E, GlobalSet, and ValueMap.
Referenced by llvm::DSGraph::spliceFrom().