LLVM API Documentation
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/ScalarEvolutionNormalization.h"
Go to the source code of this file.
Functions | |
static bool | IVUseShouldUsePostIncValue (Instruction *User, Value *Operand, const Loop *L, DominatorTree *DT) |
|
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 29 of file ScalarEvolutionNormalization.cpp.
References llvm::LoopBase< N, M >::contains(), llvm::DominatorTree::dominates(), llvm::dyn_cast(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::LoopBase< N, M >::getLoopLatch(), llvm::PHINode::getNumIncomingValues(), and llvm::Instruction::getParent().