LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::DSScalarMap Class Reference

#include <DSGraph.h>

Collaboration diagram for llvm::DSScalarMap:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ValueMapTy::const_iterator const_iterator
typedef ValueMapTy::iterator iterator
typedef GlobalSetTy::const_iterator global_iterator

Public Member Functions

iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
iterator find (Value *V)
const_iterator find (Value *V) const
unsigned count (Value *V) const
void erase (Value *V)
void replaceScalar (Value *Old, Value *New)
DSNodeHandleoperator[] (Value *V)
void erase (iterator I)
void clear ()
global_iterator global_begin () const
global_iterator global_end () const

Detailed Description

DSScalarMap - An instance of this class is used to keep track of all of which DSNode each scalar in a function points to. This is specialized to keep track of globals with nodes in the function, and to keep track of the unique DSNodeHandle being used by the scalar map.

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 35 of file DSGraph.h.


Member Typedef Documentation

typedef ValueMapTy::const_iterator llvm::DSScalarMap::const_iterator
 

Definition at line 45 of file DSGraph.h.

typedef GlobalSetTy::const_iterator llvm::DSScalarMap::global_iterator
 

Definition at line 91 of file DSGraph.h.

typedef ValueMapTy::iterator llvm::DSScalarMap::iterator
 

Definition at line 46 of file DSGraph.h.


Member Function Documentation

const_iterator llvm::DSScalarMap::begin  )  const [inline]
 

Definition at line 49 of file DSGraph.h.

iterator llvm::DSScalarMap::begin  )  [inline]
 

Definition at line 47 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::AssertGraphOK(), llvm::DSGraph::cloneInto(), llvm::DSGraph::DSGraph(), llvm::DSGraph::removeDeadNodes(), and llvm::DSGraph::removeTriviallyDeadNodes().

void llvm::DSScalarMap::clear  )  [inline]
 

Definition at line 84 of file DSGraph.h.

Referenced by llvm::DSGraph::~DSGraph().

unsigned llvm::DSScalarMap::count Value V  )  const [inline]
 

Definition at line 53 of file DSGraph.h.

Referenced by llvm::DSNode::assertOK(), and llvm::DSGraph::mergeInGraph().

const_iterator llvm::DSScalarMap::end  )  const [inline]
 

Definition at line 50 of file DSGraph.h.

iterator llvm::DSScalarMap::end  )  [inline]
 

Definition at line 48 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::AssertGraphOK(), llvm::DSGraph::cloneInto(), llvm::DSGraph::DSGraph(), llvm::ReachabilityCloner::getClonedNH(), llvm::DSGraph::getNodeForValue(), llvm::DSGraph::removeDeadNodes(), llvm::DSGraph::removeTriviallyDeadNodes(), replaceScalar(), and llvm::DSGraph::updateFromGlobalGraph().

void llvm::DSScalarMap::erase iterator  I  )  [inline]
 

Definition at line 77 of file DSGraph.h.

void llvm::DSScalarMap::erase Value V  )  [inline]
 

Definition at line 55 of file DSGraph.h.

References find().

Referenced by llvm::DSGraph::DSGraph(), llvm::DSGraph::removeDeadNodes(), llvm::DSGraph::removeTriviallyDeadNodes(), and replaceScalar().

const_iterator llvm::DSScalarMap::find Value V  )  const [inline]
 

Definition at line 52 of file DSGraph.h.

iterator llvm::DSScalarMap::find Value V  )  [inline]
 

Definition at line 51 of file DSGraph.h.

Referenced by llvm::DSNode::assertOK(), erase(), llvm::ReachabilityCloner::getClonedNH(), llvm::DSGraph::getNodeForValue(), replaceScalar(), llvm::TDDataStructures::runOnModule(), and llvm::DSGraph::updateFromGlobalGraph().

global_iterator llvm::DSScalarMap::global_begin  )  const [inline]
 

Definition at line 92 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::DSGraph(), getCaption(), llvm::DSGraph::markIncompleteNodes(), llvm::DSGraph::mergeInGraph(), and llvm::TDDataStructures::runOnModule().

global_iterator llvm::DSScalarMap::global_end  )  const [inline]
 

Definition at line 93 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::DSGraph(), getCaption(), llvm::DSGraph::markIncompleteNodes(), llvm::DSGraph::mergeInGraph(), and llvm::TDDataStructures::runOnModule().

DSNodeHandle& llvm::DSScalarMap::operator[] Value V  )  [inline]
 

Definition at line 67 of file DSGraph.h.

void llvm::DSScalarMap::replaceScalar Value Old,
Value New
[inline]
 

replaceScalar - When an instruction needs to be modified, this method can be used to update the scalar map to remove the old and insert the new.

Definition at line 60 of file DSGraph.h.

References end(), erase(), find(), and I.


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