LLVM API Documentation

llvm::IVUsers Class Reference

#include <IVUsers.h>

Inheritance diagram for llvm::IVUsers:
[legend]
Collaboration diagram for llvm::IVUsers:
[legend]

List of all members.

Public Member Functions

 IVUsers ()
bool AddUsersIfInteresting (Instruction *I)
const SCEV * getReplacementExpr (const IVStrideUse &U) const
void print (raw_ostream &OS, const Module *=0) const
virtual void print (std::ostream &OS, const Module *=0) const
void print (std::ostream *OS, const Module *M=0) const
void dump () const
 dump - This method is used for debugging.

Public Attributes

ilist< IVUsersOfOneStride > IVUses
std::map< const SCEV
*, IVUsersOfOneStride * > 
IVUsesByStride
SmallVector< const SCEV *, 16 > StrideOrder

Static Public Attributes

static char ID = 0

Friends

class IVStrideUserVH


Detailed Description

Definition at line 166 of file IVUsers.h.


Constructor & Destructor Documentation

IVUsers::IVUsers (  ) 

Definition at line 269 of file IVUsers.cpp.


Member Function Documentation

bool IVUsers::AddUsersIfInteresting ( Instruction *  I  ) 

AddUsersIfInteresting - Inspect the specified Instruction. If it is a reducible SCEV, recursively add its users to the IVUsesByStride set and return true. Otherwise, return false.

AddUsersIfInteresting - Inspect the specified instruction. If it is a reducible SCEV, recursively add its users to the IVUsesByStride set and return true. Otherwise, return false.

Definition at line 187 of file IVUsers.cpp.

References llvm::IVUsersOfOneStride::addUser(), DOUT, E, llvm::ScalarEvolution::getIntegerSCEV(), llvm::LoopInfo::getLoopFor(), llvm::ScalarEvolution::getMinusSCEV(), llvm::Instruction::getParent(), llvm::ScalarEvolution::getSCEV(), getSCEVStartAndStride(), llvm::Value::getType(), llvm::SCEV::getType(), llvm::ScalarEvolution::getTypeSizeInBits(), llvm::SmallPtrSet< PtrType, SmallSize >::insert(), llvm::ScalarEvolution::isSCEVable(), IVUses, IVUsesByStride, IVUseShouldUsePostIncValue(), Start, Stride, StrideOrder, llvm::Value::use_begin(), llvm::Value::use_end(), and llvm::IVUsersOfOneStride::Users.

const SCEV * IVUsers::getReplacementExpr ( const IVStrideUse &  U  )  const

getReplacementExpr - Return a SCEV expression which computes the value of the OperandValToReplace of the given IVStrideUse.

getReplacementExpr - Return a SCEV expression which computes the value of the OperandValToReplace of the given IVStrideUse.

Definition at line 298 of file IVUsers.cpp.

References llvm::LoopBase< BlockT, LoopT >::contains(), llvm::IVStrideUse::getOffset(), llvm::Instruction::getParent(), llvm::IVStrideUse::getParent(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), llvm::SCEV::getType(), llvm::IVStrideUse::getUser(), llvm::SCEV::isLoopInvariant(), llvm::IVStrideUse::isUseOfPostIncrementedValue(), and llvm::IVUsersOfOneStride::Stride.

Referenced by print().

void IVUsers::print ( raw_ostream &  OS,
const Module *  M = 0 
) const

void IVUsers::print ( std::ostream &  O,
const Module *  M = 0 
) const [virtual]

print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.

Reimplemented from llvm::Pass.

Definition at line 348 of file IVUsers.cpp.

References OS, and print().

void llvm::IVUsers::print ( std::ostream *  OS,
const Module *  M = 0 
) const [inline]

Reimplemented from llvm::Pass.

Definition at line 210 of file IVUsers.h.

References M, and print().

void IVUsers::dump (  )  const

dump - This method is used for debugging.

Reimplemented from llvm::Pass.

Definition at line 353 of file IVUsers.cpp.

References llvm::errs(), and print().


Friends And Related Function Documentation

friend class IVStrideUserVH [friend]

Definition at line 167 of file IVUsers.h.


Member Data Documentation

IVUses - A list of all tracked IV uses of induction variable expressions we are interested in.

Definition at line 177 of file IVUsers.h.

Referenced by AddUsersIfInteresting().

IVUsesByStride - A mapping from the strides in StrideOrder to the uses in IVUses.

Definition at line 181 of file IVUsers.h.

Referenced by AddUsersIfInteresting(), and print().

StrideOrder - An ordering of the keys in IVUsesByStride that is stable: We use this to iterate over the IVUsesByStride collection without being dependent on random ordering of pointers in the process.

Definition at line 186 of file IVUsers.h.

Referenced by AddUsersIfInteresting(), and print().

char IVUsers::ID = 0 [static]

Definition at line 196 of file IVUsers.h.


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