LLVM API Documentation

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

AliasAnalysisCounter Class Reference

Inheritance diagram for AliasAnalysisCounter:

Inheritance graph
[legend]
Collaboration diagram for AliasAnalysisCounter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 AliasAnalysisCounter ()
void printLine (const char *Desc, unsigned Val, unsigned Sum)
 ~AliasAnalysisCounter ()
bool runOnModule (Module &M)
virtual void getAnalysisUsage (AnalysisUsage &AU) const
bool pointsToConstantMemory (const Value *P)
bool doesNotAccessMemory (CallSite CS)
bool doesNotAccessMemory (Function *F)
bool onlyReadsMemory (CallSite CS)
bool onlyReadsMemory (Function *F)
AliasResult alias (const Value *V1, unsigned V1Size, const Value *V2, unsigned V2Size)
ModRefResult getModRefInfo (CallSite CS, Value *P, unsigned Size)
ModRefResult getModRefInfo (CallSite CS1, CallSite CS2)

Static Public Attributes

char ID = 0

Constructor & Destructor Documentation

AliasAnalysisCounter::AliasAnalysisCounter  )  [inline]
 

Definition at line 38 of file AliasAnalysisCounter.cpp.

AliasAnalysisCounter::~AliasAnalysisCounter  )  [inline]
 

Definition at line 47 of file AliasAnalysisCounter.cpp.


Member Function Documentation

AliasAnalysis::AliasResult AliasAnalysisCounter::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 128 of file AliasAnalysisCounter.cpp.

References PrintAll, PrintAllFailures, and llvm::WriteAsOperand().

bool AliasAnalysisCounter::doesNotAccessMemory Function F  )  [inline]
 

doesNotAccessMemory - If the specified function is known to never read or write memory, return true. For use when the call site is not known.

Reimplemented from llvm::AliasAnalysis.

Definition at line 95 of file AliasAnalysisCounter.cpp.

bool AliasAnalysisCounter::doesNotAccessMemory CallSite  CS  )  [inline]
 

doesNotAccessMemory - If the specified call is known to never read or write memory, return true. If the call only reads from known-constant memory, it is also legal to return true. Calls that unwind the stack are legal for this predicate.

Many optimizations (such as CSE and LICM) can be performed on such calls without worrying about aliasing properties, and many calls have this property (e.g. calls to 'sin' and 'cos').

This property corresponds to the GCC 'const' attribute.

Reimplemented from llvm::AliasAnalysis.

Definition at line 92 of file AliasAnalysisCounter.cpp.

virtual void AliasAnalysisCounter::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 82 of file AliasAnalysisCounter.cpp.

References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().

ModRefResult AliasAnalysisCounter::getModRefInfo CallSite  CS1,
CallSite  CS2
[inline, 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 112 of file AliasAnalysisCounter.cpp.

AliasAnalysis::ModRefResult AliasAnalysisCounter::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 154 of file AliasAnalysisCounter.cpp.

References llvm::CallSite::getInstruction(), PrintAll, PrintAllFailures, and llvm::WriteAsOperand().

bool AliasAnalysisCounter::onlyReadsMemory Function F  )  [inline]
 

onlyReadsMemory - If the specified function is known to only read from non-volatile memory (or not access memory at all), return true. For use when the call site is not known.

Reimplemented from llvm::AliasAnalysis.

Definition at line 101 of file AliasAnalysisCounter.cpp.

bool AliasAnalysisCounter::onlyReadsMemory CallSite  CS  )  [inline]
 

onlyReadsMemory - If the specified call is known to only read from non-volatile memory (or not access memory at all), return true. Calls that unwind the stack are legal for this predicate.

This property allows many common optimizations to be performed in the absence of interfering store instructions, such as CSE of strlen calls.

This property corresponds to the GCC 'pure' attribute.

Reimplemented from llvm::AliasAnalysis.

Definition at line 98 of file AliasAnalysisCounter.cpp.

bool AliasAnalysisCounter::pointsToConstantMemory const Value P  )  [inline, virtual]
 

pointsToConstantMemory - If the specified pointer is known to point into constant global memory, return true. This allows disambiguation of store instructions from constant pointers.

Reimplemented from llvm::AliasAnalysis.

Definition at line 89 of file AliasAnalysisCounter.cpp.

void AliasAnalysisCounter::printLine const char *  Desc,
unsigned  Val,
unsigned  Sum
[inline]
 

Definition at line 43 of file AliasAnalysisCounter.cpp.

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

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

Implements llvm::ModulePass.

Definition at line 75 of file AliasAnalysisCounter.cpp.


Member Data Documentation

char AliasAnalysisCounter::ID = 0 [static]
 

Reimplemented from llvm::AliasAnalysis.

Definition at line 118 of file AliasAnalysisCounter.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.