LLVM API Documentation

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
llvm::IVUsers Class Reference

#include <IVUsers.h>

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

List of all members.

Public Types

typedef ilist< IVStrideUse >
::iterator 
iterator
typedef ilist< IVStrideUse >
::const_iterator 
const_iterator

Public Member Functions

 IVUsers ()
LoopgetLoop () const
bool AddUsersIfInteresting (Instruction *I)
IVStrideUseAddUser (Instruction *User, Value *Operand)
const SCEVgetReplacementExpr (const IVStrideUse &IU) const
const SCEVgetExpr (const IVStrideUse &IU) const
 getExpr - Return the expression for the use.
const SCEVgetStride (const IVStrideUse &IU, const Loop *L) const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
bool empty () const
bool isIVUserOrOperand (Instruction *Inst) const
void print (raw_ostream &OS, const Module *=nullptr) const override
void dump () const
 dump - This method is used for debugging.

Static Public Attributes

static char ID = 0

Protected Member Functions

bool AddUsersImpl (Instruction *I, SmallPtrSetImpl< Loop * > &SimpleLoopNests)

Friends

class IVStrideUse

Detailed Description

Definition at line 119 of file IVUsers.h.


Member Typedef Documentation

Definition at line 161 of file IVUsers.h.

Definition at line 160 of file IVUsers.h.


Constructor & Destructor Documentation


Member Function Documentation

IVStrideUse & IVUsers::AddUser ( Instruction User,
Value Operand 
)

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 224 of file IVUsers.cpp.

References AddUsersImpl().

bool IVUsers::AddUsersImpl ( Instruction I,
SmallPtrSetImpl< Loop * > &  SimpleLoopNests 
) [protected]

Definition at line 162 of file IVUsers.h.

References llvm::iplist< NodeTy, Traits >::begin().

Definition at line 164 of file IVUsers.h.

References llvm::iplist< NodeTy, Traits >::begin().

void IVUsers::dump ( ) const

dump - This method is used for debugging.

Reimplemented from llvm::Pass.

Definition at line 299 of file IVUsers.cpp.

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

bool llvm::IVUsers::empty ( ) const [inline]

Definition at line 166 of file IVUsers.h.

References llvm::iplist< NodeTy, Traits >::empty().

Definition at line 163 of file IVUsers.h.

References llvm::iplist< NodeTy, Traits >::end().

const_iterator llvm::IVUsers::end ( ) const [inline]

Definition at line 165 of file IVUsers.h.

References llvm::iplist< NodeTy, Traits >::end().

Loop* llvm::IVUsers::getLoop ( ) const [inline]

Definition at line 142 of file IVUsers.h.

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.

Definition at line 311 of file IVUsers.cpp.

References llvm::IVStrideUse::getOperandValToReplace(), and llvm::ScalarEvolution::getSCEV().

Referenced by getExpr(), and print().

const SCEV * IVUsers::getStride ( const IVStrideUse IU,
const Loop L 
) const

Definition at line 342 of file IVUsers.cpp.

References findAddRecForLoop(), and getExpr().

Definition at line 168 of file IVUsers.h.

References llvm::SmallPtrSetImpl< PtrType >::count().

void IVUsers::print ( raw_ostream O,
const Module M = nullptr 
) const [override, 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 268 of file IVUsers.cpp.

References llvm::iplist< NodeTy, Traits >::begin(), llvm::iplist< NodeTy, Traits >::end(), llvm::ScalarEvolution::getBackedgeTakenCount(), llvm::LoopBase< BlockT, LoopT >::getHeader(), getReplacementExpr(), llvm::ScalarEvolution::hasLoopInvariantBackedgeTakenCount(), I, and llvm::Value::printAsOperand().

Referenced by dump().


Friends And Related Function Documentation

friend class IVStrideUse [friend]

Definition at line 120 of file IVUsers.h.

Referenced by AddUser().


Member Data Documentation

char IVUsers::ID = 0 [static]

Definition at line 139 of file IVUsers.h.


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