LLVM  3.7.0
Classes | Macros | Typedefs | Functions | Variables
ScalarEvolution.cpp File Reference
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AssumptionCache.h"
#include "llvm/Analysis/ConstantFolding.h"
#include "llvm/Analysis/InstructionSimplify.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/GetElementPtrTypeIterator.h"
#include "llvm/IR/GlobalAlias.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Operator.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
Include dependency graph for ScalarEvolution.cpp:

Go to the source code of this file.

Classes

struct  MarkPendingLoopPredicate
 RAII wrapper to prevent recursive application of isImpliedCond. More...
 

Macros

#define DEBUG_TYPE   "scalar-evolution"
 

Typedefs

typedef DenseMap< const Loop
*, std::string > 
VerifyMap
 

Functions

 STATISTIC (NumArrayLenItCounts,"Number of trip counts computed with array length")
 
 STATISTIC (NumTripCountsComputed,"Number of loops with predictable loop counts")
 
 STATISTIC (NumTripCountsNotComputed,"Number of loops without predictable loop counts")
 
 STATISTIC (NumBruteForceTripCountsComputed,"Number of loops with trip counts computed by force")
 
 INITIALIZE_PASS_BEGIN (ScalarEvolution,"scalar-evolution","Scalar Evolution Analysis", false, true) INITIALIZE_PASS_END(ScalarEvolution
 
static void GroupByComplexity (SmallVectorImpl< const SCEV * > &Ops, LoopInfo *LI)
 GroupByComplexity - Given a list of SCEV objects, order them by their complexity, and group objects of the same complexity together by value. More...
 
static int sizeOfSCEV (const SCEV *S)
 
static const SCEVBinomialCoefficient (const SCEV *It, unsigned K, ScalarEvolution &SE, Type *ResultTy)
 BinomialCoefficient - Compute BC(It, K). More...
 
static const SCEVgetSignedOverflowLimitForStep (const SCEV *Step, ICmpInst::Predicate *Pred, ScalarEvolution *SE)
 
static const SCEVgetUnsignedOverflowLimitForStep (const SCEV *Step, ICmpInst::Predicate *Pred, ScalarEvolution *SE)
 
template<typename ExtendOpTy >
static const SCEVgetPreStartForExtend (const SCEVAddRecExpr *AR, Type *Ty, ScalarEvolution *SE)
 
template<typename ExtendOpTy >
static const SCEVgetExtendAddRecStart (const SCEVAddRecExpr *AR, Type *Ty, ScalarEvolution *SE)
 
static bool CollectAddOperandsWithScales (DenseMap< const SCEV *, APInt > &M, SmallVectorImpl< const SCEV * > &NewOps, APInt &AccumulatedConstant, const SCEV *const *Ops, size_t NumOperands, const APInt &Scale, ScalarEvolution &SE)
 CollectAddOperandsWithScales - Process the given Ops list, which is a list of operands to be added under the given scale, update the given map. More...
 
static SCEV::NoWrapFlags StrengthenNoWrapFlags (ScalarEvolution *SE, SCEVTypes Type, const SmallVectorImpl< const SCEV * > &Ops, SCEV::NoWrapFlags OldFlags)
 
static uint64_t umul_ov (uint64_t i, uint64_t j, bool &Overflow)
 
static uint64_t Choose (uint64_t n, uint64_t k, bool &Overflow)
 Compute the result of "n choose k", the binomial coefficient. More...
 
static bool containsConstantSomewhere (const SCEV *StartExpr)
 Determine if any of the operands in this SCEV are a constant or if any of the add or multiply expressions in this SCEV contain a constant. More...
 
static const APInt gcd (const SCEVConstant *C1, const SCEVConstant *C2)
 
static void PushDefUseChildren (Instruction *I, SmallVectorImpl< Instruction * > &Worklist)
 PushDefUseChildren - Push users of the given Instruction onto the given Worklist. More...
 
static Optional< ConstantRangeGetRangeFromMetadata (Value *V)
 GetRangeFromMetadata - Helper method to assign a range to V from metadata present in the IR. More...
 
static void PushLoopPHIs (const Loop *L, SmallVectorImpl< Instruction * > &Worklist)
 PushLoopPHIs - Push PHI nodes in the header of the given loop onto the given Worklist. More...
 
static ConstantIntEvaluateConstantChrecAtConstant (const SCEVAddRecExpr *AddRec, ConstantInt *C, ScalarEvolution &SE)
 
static bool CanConstantFold (const Instruction *I)
 CanConstantFold - Return true if we can constant fold an instruction of the specified type, assuming that all operands were constants. More...
 
static bool canConstantEvolve (Instruction *I, const Loop *L)
 Determine whether this instruction can constant evolve within this loop assuming its operands can all constant evolve. More...
 
static PHINodegetConstantEvolvingPHIOperands (Instruction *UseInst, const Loop *L, DenseMap< Instruction *, PHINode * > &PHIMap)
 getConstantEvolvingPHIOperands - Implement getConstantEvolvingPHI by recursing through each instruction operand until reaching a loop header phi. More...
 
static PHINodegetConstantEvolvingPHI (Value *V, const Loop *L)
 getConstantEvolvingPHI - Given an LLVM value and a loop, return a PHI node in the loop that V is derived from. More...
 
static ConstantEvaluateExpression (Value *V, const Loop *L, DenseMap< Instruction *, Constant * > &Vals, const DataLayout &DL, const TargetLibraryInfo *TLI)
 EvaluateExpression - Given an expression that passes the getConstantEvolvingPHI predicate, evaluate its value assuming the PHI node in the loop has the value PHIVal. More...
 
static ConstantBuildConstantFromSCEV (const SCEV *V)
 This builds up a Constant using the ConstantExpr interface. More...
 
static const SCEVSolveLinEquationWithOverflow (const APInt &A, const APInt &B, ScalarEvolution &SE)
 SolveLinEquationWithOverflow - Finds the minimum unsigned root of the following equation: More...
 
static std::pair< const SCEV
*, const SCEV * > 
SolveQuadraticEquation (const SCEVAddRecExpr *AddRec, ScalarEvolution &SE)
 SolveQuadraticEquation - Find the roots of the quadratic equation for the given quadratic chrec {L,+,M,+,N}. More...
 
static bool HasSameValue (const SCEV *A, const SCEV *B)
 HasSameValue - SCEV structural equivalence is usually sufficient for testing whether two expressions are equal, however for the purposes of looking for a condition guarding a loop, it can be useful to be a little more general, since a front-end may have replicated the controlling expression. More...
 
static const SCEVMatchNotExpr (const SCEV *Expr)
 If Expr computes ~A, return A else return nullptr. More...
 
template<typename MaxExprType >
static bool IsMaxConsistingOf (const SCEV *MaybeMaxExpr, const SCEV *Candidate)
 Is MaybeMaxExpr an SMax or UMax of Candidate and some other values? More...
 
template<typename MaxExprType >
static bool IsMinConsistingOf (ScalarEvolution &SE, const SCEV *MaybeMinExpr, const SCEV *Candidate)
 Is MaybeMinExpr an SMin or UMin of Candidate and some other values? More...
 
static bool IsKnownPredicateViaMinOrMax (ScalarEvolution &SE, ICmpInst::Predicate Pred, const SCEV *LHS, const SCEV *RHS)
 Is LHS Pred RHS true on the virtue of LHS or RHS being a Min or Max expression? More...
 
static bool containsUndefs (const SCEV *S)
 
static bool findArrayDimensionsRec (ScalarEvolution &SE, SmallVectorImpl< const SCEV * > &Terms, SmallVectorImpl< const SCEV * > &Sizes)
 
static bool containsParameters (const SCEV *S)
 
static bool containsParameters (SmallVectorImpl< const SCEV * > &Terms)
 
static int numberOfTerms (const SCEV *S)
 
static const SCEVremoveConstantFactors (ScalarEvolution &SE, const SCEV *T)
 
static void PrintLoopInfo (raw_ostream &OS, ScalarEvolution *SE, const Loop *L)
 
static void replaceSubString (std::string &Str, StringRef From, StringRef To)
 replaceSubString - Replaces all occurrences of From in Str with To. More...
 
static void getLoopBackedgeTakenCounts (Loop *L, VerifyMap &Map, ScalarEvolution &SE)
 getLoopBackedgeTakenCounts - Helper method for verifyAnalysis. More...
 

Variables

static cl::opt< unsignedMaxBruteForceIterations ("scalar-evolution-max-iterations", cl::ReallyHidden, cl::desc("Maximum number of iterations SCEV will ""symbolically execute a constant ""derived loop"), cl::init(100))
 
static cl::opt< boolVerifySCEV ("verify-scev", cl::desc("Verify ScalarEvolution's backedge taken counts (slow)"))
 
scalar evolution
 
scalar Scalar Evolution Analysis
 
scalar Scalar Evolution false
 

Macro Definition Documentation

#define DEBUG_TYPE   "scalar-evolution"

Definition at line 94 of file ScalarEvolution.cpp.

Typedef Documentation

typedef DenseMap<const Loop *, std::string> VerifyMap

Definition at line 8452 of file ScalarEvolution.cpp.

Function Documentation

static const SCEV* BinomialCoefficient ( const SCEV It,
unsigned  K,
ScalarEvolution SE,
Type ResultTy 
)
static
static Constant* BuildConstantFromSCEV ( const SCEV V)
static
static bool canConstantEvolve ( Instruction I,
const Loop L 
)
static

Determine whether this instruction can constant evolve within this loop assuming its operands can all constant evolve.

Definition at line 5335 of file ScalarEvolution.cpp.

References CanConstantFold(), llvm::LoopBase< N, M >::contains(), llvm::LoopBase< N, M >::getHeader(), and llvm::Instruction::getParent().

Referenced by EvaluateExpression(), getConstantEvolvingPHI(), and getConstantEvolvingPHIOperands().

static bool CanConstantFold ( const Instruction I)
static

CanConstantFold - Return true if we can constant fold an instruction of the specified type, assuming that all operands were constants.

Definition at line 5321 of file ScalarEvolution.cpp.

References llvm::canConstantFoldCallTo().

Referenced by canConstantEvolve().

static uint64_t Choose ( uint64_t  n,
uint64_t  k,
bool Overflow 
)
static

Compute the result of "n choose k", the binomial coefficient.

If an intermediate computation overflows, Overflow will be set and the return will be garbage. Overflow is not cleared on absence of overflow.

Definition at line 2335 of file ScalarEvolution.cpp.

References umul_ov().

Referenced by llvm::ScalarEvolution::getMulExpr().

static bool CollectAddOperandsWithScales ( DenseMap< const SCEV *, APInt > &  M,
SmallVectorImpl< const SCEV * > &  NewOps,
APInt AccumulatedConstant,
const SCEV *const Ops,
size_t  NumOperands,
const APInt Scale,
ScalarEvolution SE 
)
static

CollectAddOperandsWithScales - Process the given Ops list, which is a list of operands to be added under the given scale, update the given map.

This is a helper function for getAddRecExpr. As an example of what it does, given a sequence of operands that would form an add expression like this:

m + n + 13 + (A * (o + p + (B * (q + m + 29)))) + r + (-1 * r)

where A and B are constants, update the map with these values:

(m, 1+A*B), (n, 1), (o, A), (p, A), (q, A*B), (r, 0)

and add 13 + A*B*29 to AccumulatedConstant. This will allow getAddRecExpr to produce this:

13+A*B*29 + n + (m * (1+A*B)) + ((o + p) * A) + (q * A*B)

This form often exposes folding opportunities that are hidden in the original operand list.

Return true iff it appears that any interesting folding opportunities may be exposed. This helps getAddRecExpr short-circuit extra work in the common case where no interesting opportunities are present, and is also used as a check to avoid infinite recursion.

Definition at line 1864 of file ScalarEvolution.cpp.

References llvm::dyn_cast(), llvm::ScalarEvolution::getMulExpr(), llvm::SCEVNAryExpr::getNumOperands(), llvm::SCEVNAryExpr::getOperand(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::SCEVNAryExpr::op_begin(), llvm::SCEVNAryExpr::op_end(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

Referenced by llvm::ScalarEvolution::getAddExpr().

static bool containsConstantSomewhere ( const SCEV StartExpr)
static

Determine if any of the operands in this SCEV are a constant or if any of the add or multiply expressions in this SCEV contain a constant.

Definition at line 2360 of file ScalarEvolution.cpp.

References llvm::SmallVectorImpl< T >::append(), llvm::SmallVectorBase::empty(), llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

Referenced by llvm::ScalarEvolution::getMulExpr().

static bool containsParameters ( const SCEV S)
inlinestatic
static bool containsParameters ( SmallVectorImpl< const SCEV * > &  Terms)
inlinestatic

Definition at line 7754 of file ScalarEvolution.cpp.

References containsParameters().

static bool containsUndefs ( const SCEV S)
inlinestatic
static ConstantInt* EvaluateConstantChrecAtConstant ( const SCEVAddRecExpr AddRec,
ConstantInt C,
ScalarEvolution SE 
)
static
static Constant* EvaluateExpression ( Value V,
const Loop L,
DenseMap< Instruction *, Constant * > &  Vals,
const DataLayout DL,
const TargetLibraryInfo TLI 
)
static

EvaluateExpression - Given an expression that passes the getConstantEvolvingPHI predicate, evaluate its value assuming the PHI node in the loop has the value PHIVal.

If we can't fold this expression for some reason, return null.

Definition at line 5411 of file ScalarEvolution.cpp.

References canConstantEvolve(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldInstOperands(), llvm::ConstantFoldLoadFromConstPtr(), llvm::dyn_cast(), llvm::User::getNumOperands(), llvm::Instruction::getOpcode(), llvm::User::getOperand(), llvm::Value::getType(), llvm::LoadInst::isVolatile(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), and Operands.

static bool findArrayDimensionsRec ( ScalarEvolution SE,
SmallVectorImpl< const SCEV * > &  Terms,
SmallVectorImpl< const SCEV * > &  Sizes 
)
static
static const APInt gcd ( const SCEVConstant C1,
const SCEVConstant C2 
)
static
static PHINode* getConstantEvolvingPHI ( Value V,
const Loop L 
)
static

getConstantEvolvingPHI - Given an LLVM value and a loop, return a PHI node in the loop that V is derived from.

We allow arbitrary operations along the way, but the operands of an operation must either be constants or a value derived from a constant PHI. If this expression does not fit with these constraints, return null.

Definition at line 5394 of file ScalarEvolution.cpp.

References canConstantEvolve(), llvm::dyn_cast(), and getConstantEvolvingPHIOperands().

static PHINode* getConstantEvolvingPHIOperands ( Instruction UseInst,
const Loop L,
DenseMap< Instruction *, PHINode * > &  PHIMap 
)
static

getConstantEvolvingPHIOperands - Implement getConstantEvolvingPHI by recursing through each instruction operand until reaching a loop header phi.

Definition at line 5353 of file ScalarEvolution.cpp.

References canConstantEvolve(), llvm::dyn_cast(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), llvm::User::op_begin(), llvm::User::op_end(), P, and llvm::TargetOpcode::PHI.

Referenced by getConstantEvolvingPHI().

template<typename ExtendOpTy >
static const SCEV* getExtendAddRecStart ( const SCEVAddRecExpr AR,
Type Ty,
ScalarEvolution SE 
)
static

Definition at line 1333 of file ScalarEvolution.cpp.

References llvm::ScalarEvolution::getAddExpr().

static void getLoopBackedgeTakenCounts ( Loop L,
VerifyMap Map,
ScalarEvolution SE 
)
static
template<typename ExtendOpTy >
static const SCEV* getPreStartForExtend ( const SCEVAddRecExpr AR,
Type Ty,
ScalarEvolution SE 
)
static
static Optional<ConstantRange> GetRangeFromMetadata ( Value V)
static

GetRangeFromMetadata - Helper method to assign a range to V from metadata present in the IR.

Definition at line 3848 of file ScalarEvolution.cpp.

References getBitWidth(), llvm::Instruction::getMetadata(), llvm::Value::getType(), llvm::ConstantInt::getValue(), llvm::LLVMContext::MD_range, llvm::None, and llvm::ConstantRange::unionWith().

static const SCEV* getSignedOverflowLimitForStep ( const SCEV Step,
ICmpInst::Predicate *  Pred,
ScalarEvolution SE 
)
static
static const SCEV* getUnsignedOverflowLimitForStep ( const SCEV Step,
ICmpInst::Predicate *  Pred,
ScalarEvolution SE 
)
static
static void GroupByComplexity ( SmallVectorImpl< const SCEV * > &  Ops,
LoopInfo LI 
)
static

GroupByComplexity - Given a list of SCEV objects, order them by their complexity, and group objects of the same complexity together by value.

When this routine is finished, we know that any duplicates in the vector are consecutive and that complexity is monotonically increasing.

Note that we go take special precautions to ensure that we get deterministic results from this routine. In other words, we don't want the results of this to depend on where the addresses of various SCEV objects happened to land in memory.

Definition at line 642 of file ScalarEvolution.cpp.

References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::SCEV::getSCEVType(), llvm::SmallVectorTemplateCommon< T >::size(), and std::swap().

Referenced by llvm::ScalarEvolution::getAddExpr(), llvm::ScalarEvolution::getMulExpr(), llvm::ScalarEvolution::getSMaxExpr(), and llvm::ScalarEvolution::getUMaxExpr().

static bool HasSameValue ( const SCEV A,
const SCEV B 
)
static

HasSameValue - SCEV structural equivalence is usually sufficient for testing whether two expressions are equal, however for the purposes of looking for a condition guarding a loop, it can be useful to be a little more general, since a front-end may have replicated the controlling expression.

Definition at line 6266 of file ScalarEvolution.cpp.

Referenced by llvm::ScalarEvolution::SimplifyICmpOperands().

INITIALIZE_PASS_BEGIN ( ScalarEvolution  ,
"scalar-evolution ,
"Scalar Evolution Analysis ,
false  ,
true   
)
static bool IsKnownPredicateViaMinOrMax ( ScalarEvolution SE,
ICmpInst::Predicate  Pred,
const SCEV LHS,
const SCEV RHS 
)
static

Is LHS Pred RHS true on the virtue of LHS or RHS being a Min or Max expression?

Definition at line 7090 of file ScalarEvolution.cpp.

References llvm::CmpInst::ICMP_SGE, llvm::CmpInst::ICMP_SLE, llvm::CmpInst::ICMP_UGE, llvm::CmpInst::ICMP_ULE, llvm_unreachable, and std::swap().

template<typename MaxExprType >
static bool IsMaxConsistingOf ( const SCEV MaybeMaxExpr,
const SCEV Candidate 
)
static

Is MaybeMaxExpr an SMax or UMax of Candidate and some other values?

Definition at line 7065 of file ScalarEvolution.cpp.

References llvm::dyn_cast().

template<typename MaxExprType >
static bool IsMinConsistingOf ( ScalarEvolution SE,
const SCEV MaybeMinExpr,
const SCEV Candidate 
)
static

Is MaybeMinExpr an SMin or UMin of Candidate and some other values?

Definition at line 7077 of file ScalarEvolution.cpp.

References llvm::ScalarEvolution::getNotSCEV(), and MatchNotExpr().

static const SCEV* MatchNotExpr ( const SCEV Expr)
static
static int numberOfTerms ( const SCEV S)
inlinestatic

Definition at line 7762 of file ScalarEvolution.cpp.

Referenced by llvm::ScalarEvolution::findArrayDimensions().

static void PrintLoopInfo ( raw_ostream OS,
ScalarEvolution SE,
const Loop L 
)
static
static void PushDefUseChildren ( Instruction I,
SmallVectorImpl< Instruction * > &  Worklist 
)
static

PushDefUseChildren - Push users of the given Instruction onto the given Worklist.

Definition at line 3538 of file ScalarEvolution.cpp.

References llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and llvm::Value::users().

Referenced by llvm::ScalarEvolution::forgetLoop(), and llvm::ScalarEvolution::forgetValue().

static void PushLoopPHIs ( const Loop L,
SmallVectorImpl< Instruction * > &  Worklist 
)
static

PushLoopPHIs - Push PHI nodes in the header of the given loop onto the given Worklist.

Definition at line 4592 of file ScalarEvolution.cpp.

References llvm::BasicBlock::begin(), llvm::dyn_cast(), llvm::LoopBase< N, M >::getHeader(), I, and llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back().

Referenced by llvm::ScalarEvolution::forgetLoop().

static const SCEV* removeConstantFactors ( ScalarEvolution SE,
const SCEV T 
)
static
static void replaceSubString ( std::string &  Str,
StringRef  From,
StringRef  To 
)
static

replaceSubString - Replaces all occurrences of From in Str with To.

Definition at line 8455 of file ScalarEvolution.cpp.

References llvm::StringRef::data(), and llvm::StringRef::size().

Referenced by getLoopBackedgeTakenCounts().

static int sizeOfSCEV ( const SCEV S)
inlinestatic
static const SCEV* SolveLinEquationWithOverflow ( const APInt A,
const APInt B,
ScalarEvolution SE 
)
static

SolveLinEquationWithOverflow - Finds the minimum unsigned root of the following equation:

A * X = B (mod N)

where N = 2^BW and BW is the common bit width of A and B. The signedness of A and B isn't important.

If the equation does not have a solution, SCEVCouldNotCompute is returned.

Definition at line 5968 of file ScalarEvolution.cpp.

References llvm::APInt::countTrailingZeros(), llvm::APInt::getBitWidth(), llvm::ScalarEvolution::getConstant(), llvm::ScalarEvolution::getCouldNotCompute(), llvm::APInt::lshr(), llvm::APInt::multiplicativeInverse(), llvm::APInt::setBit(), llvm::APInt::trunc(), llvm::APIntOps::urem(), and llvm::APInt::zext().

static std::pair<const SCEV *,const SCEV *> SolveQuadraticEquation ( const SCEVAddRecExpr AddRec,
ScalarEvolution SE 
)
static

SolveQuadraticEquation - Find the roots of the quadratic equation for the given quadratic chrec {L,+,M,+,N}.

This returns either the two roots (which might be the same) or two SCEVCouldNotCompute objects.

Definition at line 6012 of file ScalarEvolution.cpp.

References llvm::ARM_PROC::A, llvm::dyn_cast(), llvm::ConstantInt::get(), llvm::ScalarEvolution::getConstant(), llvm::ScalarEvolution::getContext(), llvm::ScalarEvolution::getCouldNotCompute(), llvm::SCEVNAryExpr::getNumOperands(), llvm::SCEVNAryExpr::getOperand(), llvm::APInt::isMinValue(), N, NC, llvm::APInt::sdiv(), and llvm::APIntOps::sdiv().

Referenced by llvm::SCEVAddRecExpr::getNumIterationsInRange().

STATISTIC ( NumArrayLenItCounts  ,
"Number of trip counts computed with array length"   
)
STATISTIC ( NumTripCountsComputed  ,
"Number of loops with predictable loop counts"   
)
STATISTIC ( NumTripCountsNotComputed  ,
"Number of loops without predictable loop counts"   
)
STATISTIC ( NumBruteForceTripCountsComputed  ,
"Number of loops with trip counts computed by force"   
)
static SCEV::NoWrapFlags StrengthenNoWrapFlags ( ScalarEvolution SE,
SCEVTypes  Type,
const SmallVectorImpl< const SCEV * > &  Ops,
SCEV::NoWrapFlags  OldFlags 
)
static
static uint64_t umul_ov ( uint64_t  i,
uint64_t  j,
bool Overflow 
)
static

Definition at line 2326 of file ScalarEvolution.cpp.

Referenced by Choose(), and llvm::ScalarEvolution::getMulExpr().

Variable Documentation

scalar Scalar Evolution Analysis

Definition at line 123 of file ScalarEvolution.cpp.

scalar evolution

Definition at line 123 of file ScalarEvolution.cpp.

scalar Scalar Evolution false

Definition at line 123 of file ScalarEvolution.cpp.

cl::opt<unsigned> MaxBruteForceIterations("scalar-evolution-max-iterations", cl::ReallyHidden, cl::desc("Maximum number of iterations SCEV will ""symbolically execute a constant ""derived loop"), cl::init(100))
static
cl::opt<bool> VerifySCEV("verify-scev", cl::desc("Verify ScalarEvolution's backedge taken counts (slow)"))
static