Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Analysis/ScalarEvolution.h
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
class GEPOperator; | class GEPOperator; | ||||
class Instruction; | class Instruction; | ||||
class LLVMContext; | class LLVMContext; | ||||
class Loop; | class Loop; | ||||
class LoopInfo; | class LoopInfo; | ||||
class raw_ostream; | class raw_ostream; | ||||
class ScalarEvolution; | class ScalarEvolution; | ||||
class SCEVAddRecExpr; | class SCEVAddRecExpr; | ||||
class SCEVConstant; | |||||
class SCEVUnknown; | class SCEVUnknown; | ||||
class StructType; | class StructType; | ||||
class TargetLibraryInfo; | class TargetLibraryInfo; | ||||
class Type; | class Type; | ||||
class Value; | class Value; | ||||
enum SCEVTypes : unsigned short; | enum SCEVTypes : unsigned short; | ||||
extern bool VerifySCEV; | extern bool VerifySCEV; | ||||
▲ Show 20 Lines • Show All 484 Lines • ▼ Show 20 Lines | public: | ||||
/// Return true if the SCEV expression contains a Value that has been | /// Return true if the SCEV expression contains a Value that has been | ||||
/// optimised out and is now a nullptr. | /// optimised out and is now a nullptr. | ||||
bool containsErasedValue(const SCEV *S) const; | bool containsErasedValue(const SCEV *S) const; | ||||
/// Return a SCEV expression for the full generality of the specified | /// Return a SCEV expression for the full generality of the specified | ||||
/// expression. | /// expression. | ||||
const SCEV *getSCEV(Value *V); | const SCEV *getSCEV(Value *V); | ||||
const SCEV *getConstant(ConstantInt *V); | const SCEVConstant *getConstant(ConstantInt *V); | ||||
const SCEV *getConstant(const APInt &Val); | const SCEVConstant *getConstant(const APInt &Val); | ||||
const SCEV *getConstant(Type *Ty, uint64_t V, bool isSigned = false); | const SCEVConstant *getConstant(Type *Ty, uint64_t V, bool isSigned = false); | ||||
const SCEV *getLosslessPtrToIntExpr(const SCEV *Op, unsigned Depth = 0); | const SCEV *getLosslessPtrToIntExpr(const SCEV *Op, unsigned Depth = 0); | ||||
const SCEV *getPtrToIntExpr(const SCEV *Op, Type *Ty); | const SCEV *getPtrToIntExpr(const SCEV *Op, Type *Ty); | ||||
const SCEV *getTruncateExpr(const SCEV *Op, Type *Ty, unsigned Depth = 0); | const SCEV *getTruncateExpr(const SCEV *Op, Type *Ty, unsigned Depth = 0); | ||||
const SCEV *getZeroExtendExpr(const SCEV *Op, Type *Ty, unsigned Depth = 0); | const SCEV *getZeroExtendExpr(const SCEV *Op, Type *Ty, unsigned Depth = 0); | ||||
const SCEV *getZeroExtendExprImpl(const SCEV *Op, Type *Ty, | const SCEV *getZeroExtendExprImpl(const SCEV *Op, Type *Ty, | ||||
unsigned Depth = 0); | unsigned Depth = 0); | ||||
const SCEV *getSignExtendExpr(const SCEV *Op, Type *Ty, unsigned Depth = 0); | const SCEV *getSignExtendExpr(const SCEV *Op, Type *Ty, unsigned Depth = 0); | ||||
const SCEV *getSignExtendExprImpl(const SCEV *Op, Type *Ty, | const SCEV *getSignExtendExprImpl(const SCEV *Op, Type *Ty, | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | public: | ||||
const SCEV *getUMinExpr(const SCEV *LHS, const SCEV *RHS, | const SCEV *getUMinExpr(const SCEV *LHS, const SCEV *RHS, | ||||
bool Sequential = false); | bool Sequential = false); | ||||
const SCEV *getUMinExpr(SmallVectorImpl<const SCEV *> &Operands, | const SCEV *getUMinExpr(SmallVectorImpl<const SCEV *> &Operands, | ||||
bool Sequential = false); | bool Sequential = false); | ||||
const SCEV *getUnknown(Value *V); | const SCEV *getUnknown(Value *V); | ||||
const SCEV *getCouldNotCompute(); | const SCEV *getCouldNotCompute(); | ||||
/// Return a SCEV for the constant 0 of a specific type. | /// Return a SCEV for the constant 0 of a specific type. | ||||
const SCEV *getZero(Type *Ty) { return getConstant(Ty, 0); } | const SCEVConstant *getZero(Type *Ty) { return getConstant(Ty, 0); } | ||||
/// Return a SCEV for the constant 1 of a specific type. | /// Return a SCEV for the constant 1 of a specific type. | ||||
const SCEV *getOne(Type *Ty) { return getConstant(Ty, 1); } | const SCEVConstant *getOne(Type *Ty) { return getConstant(Ty, 1); } | ||||
/// Return a SCEV for the constant \p Power of two. | /// Return a SCEV for the constant \p Power of two. | ||||
const SCEV *getPowerOfTwo(Type *Ty, unsigned Power) { | const SCEVConstant *getPowerOfTwo(Type *Ty, unsigned Power) { | ||||
assert(Power < getTypeSizeInBits(Ty) && "Power out of range"); | assert(Power < getTypeSizeInBits(Ty) && "Power out of range"); | ||||
return getConstant(APInt::getOneBitSet(getTypeSizeInBits(Ty), Power)); | return getConstant(APInt::getOneBitSet(getTypeSizeInBits(Ty), Power)); | ||||
} | } | ||||
/// Return a SCEV for the constant -1 of a specific type. | /// Return a SCEV for the constant -1 of a specific type. | ||||
const SCEV *getMinusOne(Type *Ty) { | const SCEVConstant *getMinusOne(Type *Ty) { | ||||
return getConstant(Ty, -1, /*isSigned=*/true); | return getConstant(Ty, -1, /*isSigned=*/true); | ||||
} | } | ||||
/// Return an expression for a TypeSize. | /// Return an expression for a TypeSize. | ||||
const SCEV *getSizeOfExpr(Type *IntTy, TypeSize Size); | const SCEV *getSizeOfExpr(Type *IntTy, TypeSize Size); | ||||
/// Return an expression for the alloc size of AllocTy that is type IntTy | /// Return an expression for the alloc size of AllocTy that is type IntTy | ||||
const SCEV *getSizeOfExpr(Type *IntTy, Type *AllocTy); | const SCEV *getSizeOfExpr(Type *IntTy, Type *AllocTy); | ||||
▲ Show 20 Lines • Show All 1,733 Lines • Show Last 20 Lines |