LLVM API Documentation

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

Andersens Class Reference

Inheritance diagram for Andersens:

Inheritance graph
[legend]
Collaboration diagram for Andersens:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Andersens ()
bool runOnModule (Module &M)
void releaseMemory ()
virtual void getAnalysisUsage (AnalysisUsage &AU) const
AliasResult alias (const Value *V1, unsigned V1Size, const Value *V2, unsigned V2Size)
virtual ModRefResult getModRefInfo (CallSite CS, Value *P, unsigned Size)
virtual ModRefResult getModRefInfo (CallSite CS1, CallSite CS2)
void getMustAliases (Value *P, std::vector< Value * > &RetVals)
bool pointsToConstantMemory (const Value *P)
virtual void deleteValue (Value *V)
virtual void copyValue (Value *From, Value *To)

Static Public Attributes

char ID = 0

Friends

class InstVisitor<Andersens>

Constructor & Destructor Documentation

Andersens::Andersens  )  [inline]
 

Definition at line 434 of file Andersens.cpp.


Member Function Documentation

AliasAnalysis::AliasResult Andersens::alias const Value V1,
unsigned  V1Size,
const Value V2,
unsigned  V2Size
[virtual]
 

alias - The main low level interface to the alias analysis implementation. Returns a Result indicating whether the two pointers are aliased to each other. This is the interface that must be implemented by specific alias analysis implementations.

Reimplemented from llvm::AliasAnalysis.

Definition at line 627 of file Andersens.cpp.

virtual void Andersens::copyValue Value From,
Value To
[inline, virtual]
 

copyValue - This method should be used whenever a preexisting value in the program is copied or cloned, introducing a new value. Note that analysis implementations should tolerate clients that use this method to introduce the same value multiple times: if the analysis already knows about a value, it should ignore the request.

Reimplemented from llvm::AliasAnalysis.

Definition at line 490 of file Andersens.cpp.

virtual void Andersens::deleteValue Value V  )  [inline, virtual]
 

deleteValue - This method should be called whenever an LLVM Value is deleted from the program, for example when an instruction is found to be redundant and is eliminated.

Reimplemented from llvm::AliasAnalysis.

Definition at line 485 of file Andersens.cpp.

virtual void Andersens::getAnalysisUsage AnalysisUsage AU  )  const [inline, virtual]
 

getAnalysisUsage - All alias analysis implementations should invoke this directly (using AliasAnalysis::getAnalysisUsage(AU)) to make sure that TargetData is required by the pass.

Reimplemented from llvm::AliasAnalysis.

Definition at line 470 of file Andersens.cpp.

References llvm::AnalysisUsage::setPreservesAll().

AliasAnalysis::ModRefResult Andersens::getModRefInfo CallSite  CS1,
CallSite  CS2
[virtual]
 

getModRefInfo - Return information about whether two call sites may refer to the same set of memory locations. This function returns NoModRef if the two calls refer to disjoint memory locations, Ref if CS1 reads memory written by CS2, Mod if CS1 writes to memory read or written by CS2, or ModRef if CS1 might read or write memory accessed by CS2.

Reimplemented from llvm::AliasAnalysis.

Definition at line 669 of file Andersens.cpp.

AliasAnalysis::ModRefResult Andersens::getModRefInfo CallSite  CS,
Value P,
unsigned  Size
[virtual]
 

getModRefInfo (for call sites) - Return whether information about whether a particular call site modifies or reads the memory specified by the pointer.

Reimplemented from llvm::AliasAnalysis.

Definition at line 641 of file Andersens.cpp.

References llvm::CallSite::getCalledFunction(), and llvm::Function::isDeclaration().

void Andersens::getMustAliases Value P,
std::vector< Value * > &  RetVals
[virtual]
 

getMustAlias - We can provide must alias information if we know that a pointer can only point to a specific function or the null pointer. Unfortunately we cannot determine must-alias information for global variables or any other memory memory objects because we do not track whether a pointer points to the beginning of an object or a field of it.

Reimplemented from llvm::AliasAnalysis.

Definition at line 678 of file Andersens.cpp.

References llvm::Value::getType().

bool Andersens::pointsToConstantMemory const Value P  )  [virtual]
 

pointsToConstantMemory - If we can determine that this pointer only points to constant memory, return true. In practice, this means that if the pointer can only point to constant globals, functions, or the null pointer, return true.

Reimplemented from llvm::AliasAnalysis.

Definition at line 704 of file Andersens.cpp.

References llvm::SparseBitVector< ElementSize >::end().

void Andersens::releaseMemory  )  [inline, virtual]
 

releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused.

Optionally implement this function to release pass memory when it is no longer used.

Reimplemented from llvm::Pass.

Definition at line 458 of file Andersens.cpp.

bool Andersens::runOnModule Module M  )  [inline, virtual]
 

runOnModule - Virtual method overriden by subclasses to process the module being operated on.

Implements llvm::ModulePass.

Definition at line 436 of file Andersens.cpp.

References DEBUG.


Friends And Related Function Documentation

friend class InstVisitor<Andersens> [friend]
 

Definition at line 587 of file Andersens.cpp.


Member Data Documentation

char Andersens::ID = 0 [static]
 

Reimplemented from llvm::AliasAnalysis.

Definition at line 613 of file Andersens.cpp.


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


This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.