LLVM API Documentation
#include "llvm/Transforms/Utils/SimplifyIndVar.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/IVUsers.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Namespaces | |
namespace | llvm |
List of target independent CodeGen pass IDs. | |
Defines | |
#define | DEBUG_TYPE "indvars" |
Functions | |
STATISTIC (NumElimIdentity,"Number of IV identities eliminated") | |
STATISTIC (NumElimOperand,"Number of IV operands folded into a use") | |
STATISTIC (NumElimRem,"Number of IV remainder operations eliminated") | |
STATISTIC (NumElimCmp,"Number of IV comparisons eliminated") | |
static void | pushIVUsers (Instruction *Def, SmallPtrSet< Instruction *, 16 > &Simplified, SmallVectorImpl< std::pair< Instruction *, Instruction * > > &SimpleIVUsers) |
static bool | isSimpleIVUser (Instruction *I, const Loop *L, ScalarEvolution *SE) |
bool | llvm::simplifyUsersOfIV (PHINode *CurrIV, ScalarEvolution *SE, LPPassManager *LPM, SmallVectorImpl< WeakVH > &Dead, IVVisitor *V=nullptr) |
bool | llvm::simplifyLoopIVs (Loop *L, ScalarEvolution *SE, LPPassManager *LPM, SmallVectorImpl< WeakVH > &Dead) |
#define DEBUG_TYPE "indvars" |
Definition at line 35 of file SimplifyIndVar.cpp.
static bool isSimpleIVUser | ( | Instruction * | I, |
const Loop * | L, | ||
ScalarEvolution * | SE | ||
) | [static] |
isSimpleIVUser - Return true if this instruction generates a simple SCEV expression in terms of that IV.
This is similar to IVUsers' isInteresting() but processes each instruction non-recursively when the operand is already known to be a simpleIVUser.
Definition at line 362 of file SimplifyIndVar.cpp.
References llvm::dyn_cast(), llvm::SCEVAddRecExpr::getLoop(), llvm::ScalarEvolution::getSCEV(), llvm::Value::getType(), and llvm::ScalarEvolution::isSCEVable().
static void pushIVUsers | ( | Instruction * | Def, |
SmallPtrSet< Instruction *, 16 > & | Simplified, | ||
SmallVectorImpl< std::pair< Instruction *, Instruction * > > & | SimpleIVUsers | ||
) | [static] |
pushIVUsers - Add all uses of Def to the current IV's worklist.
Definition at line 339 of file SimplifyIndVar.cpp.
References llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::Value::users().
STATISTIC | ( | NumElimIdentity | , |
"Number of IV identities eliminated" | |||
) |
STATISTIC | ( | NumElimOperand | , |
"Number of IV operands folded into a use" | |||
) |
STATISTIC | ( | NumElimRem | , |
"Number of IV remainder operations eliminated" | |||
) |
STATISTIC | ( | NumElimCmp | , |
"Number of IV comparisons eliminated" | |||
) |