LLVM
8.0.1
|
#include "llvm/Analysis/IVUsers.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/CodeMetrics.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "iv-users" |
Functions | |
INITIALIZE_PASS_BEGIN (IVUsersWrapperPass, "iv-users", "Induction Variable Users", false, true) INITIALIZE_PASS_END(IVUsersWrapperPass | |
static bool | isInteresting (const SCEV *S, const Instruction *I, const Loop *L, ScalarEvolution *SE, LoopInfo *LI) |
isInteresting - Test whether the given expression is "interesting" when used by the given expression, within the context of analyzing the given loop. More... | |
static bool | isSimplifiedLoopNest (BasicBlock *BB, const DominatorTree *DT, const LoopInfo *LI, SmallPtrSetImpl< Loop *> &SimpleLoopNests) |
Return true if all loop headers that dominate this block are in simplified form. More... | |
static bool | IVUseShouldUsePostIncValue (Instruction *User, Value *Operand, const Loop *L, DominatorTree *DT) |
IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression and now we need to decide whether the user should use the preinc or post-inc value. More... | |
static const SCEVAddRecExpr * | findAddRecForLoop (const SCEV *S, const Loop *L) |
Variables | |
iv | users |
iv Induction Variable | Users |
iv Induction Variable | false |
#define DEBUG_TYPE "iv-users" |
Definition at line 36 of file IVUsers.cpp.
Definition at line 395 of file IVUsers.cpp.
References llvm::MCID::Add.
Referenced by llvm::IVUsers::getStride().
INITIALIZE_PASS_BEGIN | ( | IVUsersWrapperPass | , |
"iv-users" | , | ||
"Induction Variable Users" | , | ||
false | , | ||
true | |||
) |
Referenced by llvm::IVUsersAnalysis::run().
|
static |
isInteresting - Test whether the given expression is "interesting" when used by the given expression, within the context of analyzing the given loop.
Definition at line 60 of file IVUsers.cpp.
References llvm::MCID::Add, llvm::LoopBase< BlockT, LoopT >::contains(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::Instruction::getParent(), llvm::ScalarEvolution::getSCEVAtScope(), and I.
Referenced by llvm::IVUsers::AddUsersImpl().
|
static |
Return true if all loop headers that dominate this block are in simplified form.
Definition at line 95 of file IVUsers.cpp.
References llvm::SmallPtrSetImpl< PtrType >::count(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::DomTreeNodeBase< NodeT >::getIDom(), llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::DominatorTreeBase< NodeT, IsPostDom >::getNode(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::Loop::isLoopSimplifyForm().
Referenced by llvm::IVUsers::AddUsersImpl().
|
static |
IVUseShouldUsePostIncValue - We have discovered a "User" of an IV expression and now we need to decide whether the user should use the preinc or post-inc value.
If this user should use the post-inc version of the IV, return true.
Choosing wrong here can break dominance properties (if we choose to use the post-inc value when we cannot) or it can end up adding extra live-ranges to the loop, resulting in reg-reg copies (if we use the pre-inc value when we should use the post-inc value).
Definition at line 129 of file IVUsers.cpp.
References llvm::LoopBase< BlockT, LoopT >::contains(), llvm::DominatorTree::dominates(), llvm::dyn_cast(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::LoopBase< BlockT, LoopT >::getLoopLatch(), llvm::PHINode::getNumIncomingValues(), and llvm::Instruction::getParent().
Referenced by llvm::IVUsers::AddUsersImpl().
iv Induction Variable false |
Definition at line 52 of file IVUsers.cpp.
iv users |
Definition at line 52 of file IVUsers.cpp.
Referenced by getChainID(), llvm::CoroIdInst::getCoroAlloc(), llvm::CoroIdInst::getCoroBegin(), llvm::StatepointBase< Function, Instruction, Value, CallSite >::getGCResult(), llvm::StatepointBase< Function, Instruction, Value, CallSite >::getRelocates(), isIgnorableInst(), and llvm::VPValue::replaceAllUsesWith().
iv Induction Variable Users |
Definition at line 52 of file IVUsers.cpp.
Referenced by llvm::mca::WriteState::addUser(), llvm::createObjCARCOptPass(), llvm::findDefsUsedOutsideOfLoop(), llvm::CodeExtractor::findInputsOutputs(), getNarrowIntrinsic(), hasProfileData(), hasUsesOutsideLoop(), insertTrivialPHIs(), isContractable(), isIgnorableInst(), isZeroLengthArray(), makeAllConstantUsesInstructions(), MarkBlocksLiveIn(), llvm::mca::WriteState::onInstructionIssued(), llvm::mca::ResourceManager::resolveResourceMask(), rewriteDebugUsers(), sink(), and llvm::InstCombiner::visitAllocSite().