LLVM 22.0.0git
llvm::IVUsers Class Reference

#include "llvm/Analysis/IVUsers.h"

Public Types

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

Public Member Functions

 IVUsers (Loop *L, AssumptionCache *AC, LoopInfo *LI, DominatorTree *DT, ScalarEvolution *SE)
 IVUsers (IVUsers &&X)
 IVUsers (const IVUsers &)=delete
IVUsersoperator= (IVUsers &&)=delete
IVUsersoperator= (const IVUsers &)=delete
LoopgetLoop () const
bool AddUsersIfInteresting (Instruction *I)
 AddUsersIfInteresting - Inspect the specified Instruction.
IVStrideUseAddUser (Instruction *User, Value *Operand)
const SCEVgetReplacementExpr (const IVStrideUse &IU) const
 getReplacementExpr - Return a SCEV expression which computes the value of the OperandValToReplace of the given IVStrideUse.
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 releaseMemory ()
void print (raw_ostream &OS, const Module *=nullptr) const
void dump () const
 dump - This method is used for debugging.

Friends

class IVStrideUse

Detailed Description

Definition at line 91 of file IVUsers.h.

Member Typedef Documentation

◆ const_iterator

◆ iterator

Definition at line 141 of file IVUsers.h.

Constructor & Destructor Documentation

◆ IVUsers() [1/3]

IVUsers::IVUsers ( Loop * L,
AssumptionCache * AC,
LoopInfo * LI,
DominatorTree * DT,
ScalarEvolution * SE )

◆ IVUsers() [2/3]

llvm::IVUsers::IVUsers ( IVUsers && X)
inline

Definition at line 111 of file IVUsers.h.

References IVStrideUse, IVUsers(), llvm::move(), and X.

◆ IVUsers() [3/3]

llvm::IVUsers::IVUsers ( const IVUsers & )
delete

References IVUsers().

Member Function Documentation

◆ AddUser()

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

Definition at line 246 of file IVUsers.cpp.

References IVStrideUse.

Referenced by AddUsersIfInteresting().

◆ AddUsersIfInteresting()

bool IVUsers::AddUsersIfInteresting ( Instruction * I)

AddUsersIfInteresting - Inspect the specified Instruction.

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

References AddUser(), AddUsersIfInteresting(), llvm::cast(), llvm::dbgs(), llvm::denormalizeForPostIncUse(), DL, I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::isa(), isInteresting(), llvm::isSafeToSpeculativelyExecute(), IVStrideUse, IVUseShouldUsePostIncValue(), LLVM_DEBUG, and llvm::normalizeForPostIncUseIf().

Referenced by AddUsersIfInteresting(), and IVUsers().

◆ begin() [1/2]

iterator llvm::IVUsers::begin ( )
inline

Definition at line 143 of file IVUsers.h.

◆ begin() [2/2]

const_iterator llvm::IVUsers::begin ( ) const
inline

Definition at line 145 of file IVUsers.h.

◆ dump()

LLVM_DUMP_METHOD void IVUsers::dump ( ) const

dump - This method is used for debugging.

Definition at line 292 of file IVUsers.cpp.

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

◆ empty()

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

Definition at line 147 of file IVUsers.h.

◆ end() [1/2]

iterator llvm::IVUsers::end ( )
inline

Definition at line 144 of file IVUsers.h.

◆ end() [2/2]

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

Definition at line 146 of file IVUsers.h.

◆ getExpr()

const SCEV * IVUsers::getExpr ( const IVStrideUse & IU) const

getExpr - Return the expression for the use.

Returns nullptr if the result is not invertible.

Definition at line 334 of file IVUsers.cpp.

References llvm::IVStrideUse::getPostIncLoops(), getReplacementExpr(), IVStrideUse, and llvm::normalizeForPostIncUse().

Referenced by getStride().

◆ getLoop()

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

Definition at line 122 of file IVUsers.h.

◆ getReplacementExpr()

const SCEV * IVUsers::getReplacementExpr ( const IVStrideUse & IU) 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.

Definition at line 329 of file IVUsers.cpp.

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

Referenced by getExpr(), and print().

◆ getStride()

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

Definition at line 356 of file IVUsers.cpp.

References findAddRecForLoop(), getExpr(), and IVStrideUse.

◆ isIVUserOrOperand()

bool llvm::IVUsers::isIVUserOrOperand ( Instruction * Inst) const
inline

Definition at line 149 of file IVUsers.h.

◆ operator=() [1/2]

IVUsers & llvm::IVUsers::operator= ( const IVUsers & )
delete

References IVUsers().

◆ operator=() [2/2]

IVUsers & llvm::IVUsers::operator= ( IVUsers && )
delete

References IVUsers().

◆ print()

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

Definition at line 265 of file IVUsers.cpp.

References getReplacementExpr(), and IVStrideUse.

Referenced by dump().

◆ releaseMemory()

void IVUsers::releaseMemory ( )

Definition at line 295 of file IVUsers.cpp.

◆ IVStrideUse

friend class IVStrideUse
friend

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