LLVM API Documentation
#include <IVUsers.h>
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 |
Definition at line 166 of file IVUsers.h.
| IVUsers::IVUsers | ( | ) |
Definition at line 269 of file IVUsers.cpp.
| 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 |
Definition at line 318 of file IVUsers.cpp.
References E, llvm::LoopBase< BlockT, LoopT >::getHeader(), getReplacementExpr(), IVUsesByStride, Stride, StrideOrder, and llvm::WriteAsOperand().
| 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.
| void llvm::IVUsers::print | ( | std::ostream * | OS, | |
| const Module * | M = 0 | |||
| ) | const [inline] |
| 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().
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().
| std::map<const SCEV *, IVUsersOfOneStride*> llvm::IVUsers::IVUsesByStride |
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().
| SmallVector<const SCEV *, 16> llvm::IVUsers::StrideOrder |
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] |