diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-07 09:21:09 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-07 09:21:09 +0000 |
| commit | d2a7037439ec5d4f4d2b7a813a3f1a83e10756b1 (patch) | |
| tree | 7faa7e6887831d68515763b37bd680e3d4a886ea /include | |
| parent | f4fe016fa15f703fe9c1b932d1e81e2c718521db (diff) | |
Notes
Diffstat (limited to 'include')
| -rw-r--r-- | include/llvm/Analysis/ScalarEvolution.h | 14 | ||||
| -rw-r--r-- | include/llvm/DerivedTypes.h | 20 | ||||
| -rw-r--r-- | include/llvm/Type.h | 2 |
3 files changed, 28 insertions, 8 deletions
diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index 88002cb77530e..e3d429934cc7d 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -227,9 +227,9 @@ namespace llvm { /// TargetData *TD; - /// UnknownValue - This SCEV is used to represent unknown trip counts and - /// things. - SCEVHandle UnknownValue; + /// CouldNotCompute - This SCEV is used to represent unknown trip + /// counts and things. + SCEVHandle CouldNotCompute; /// Scalars - This is a cache of the scalars we have analyzed so far. /// @@ -322,23 +322,23 @@ namespace llvm { /// a constant number of times (the condition evolves only from constants), /// try to evaluate a few iterations of the loop until we get the exit /// condition gets a value of ExitWhen (true or false). If we cannot - /// evaluate the trip count of the loop, return UnknownValue. + /// evaluate the trip count of the loop, return CouldNotCompute. SCEVHandle ComputeBackedgeTakenCountExhaustively(const Loop *L, Value *Cond, bool ExitWhen); /// HowFarToZero - Return the number of times a backedge comparing the /// specified value to zero will execute. If not computable, return - /// UnknownValue. + /// CouldNotCompute. SCEVHandle HowFarToZero(const SCEV *V, const Loop *L); /// HowFarToNonZero - Return the number of times a backedge checking the /// specified value for nonzero will execute. If not computable, return - /// UnknownValue. + /// CouldNotCompute. SCEVHandle HowFarToNonZero(const SCEV *V, const Loop *L); /// HowManyLessThans - Return the number of times a backedge containing the /// specified less-than comparison will execute. If not computable, return - /// UnknownValue. isSigned specifies whether the less-than is signed. + /// CouldNotCompute. isSigned specifies whether the less-than is signed. BackedgeTakenInfo HowManyLessThans(const SCEV *LHS, const SCEV *RHS, const Loop *L, bool isSigned); diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index dd6d908df4104..fa951bf70d05e 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -159,6 +159,10 @@ public: /// type. static bool isValidReturnType(const Type *RetTy); + /// isValidArgumentType - Return true if the specified type is valid as an + /// argument type. + static bool isValidArgumentType(const Type *ArgTy); + inline bool isVarArg() const { return isVarArgs; } inline const Type *getReturnType() const { return ContainedTys[0]; } @@ -232,6 +236,10 @@ public: /// an empty struct, pass NULL, NULL. static StructType *get(const Type *type, ...) END_WITH_NULL; + /// isValidElementType - Return true if the specified type is valid as a + /// element type. + static bool isValidElementType(const Type *ElemTy); + // Iterator access to the elements typedef Type::subtype_iterator element_iterator; element_iterator element_begin() const { return ContainedTys; } @@ -331,6 +339,10 @@ public: /// static ArrayType *get(const Type *ElementType, uint64_t NumElements); + /// isValidElementType - Return true if the specified type is valid as a + /// element type. + static bool isValidElementType(const Type *ElemTy); + inline uint64_t getNumElements() const { return NumElements; } // Implement the AbstractTypeUser interface. @@ -391,6 +403,10 @@ public: return VectorType::get(EltTy, VTy->getNumElements()); } + /// isValidElementType - Return true if the specified type is valid as a + /// element type. + static bool isValidElementType(const Type *ElemTy); + /// @brief Return the number of elements in the Vector type. inline unsigned getNumElements() const { return NumElements; } @@ -431,6 +447,10 @@ public: return PointerType::get(ElementType, 0); } + /// isValidElementType - Return true if the specified type is valid as a + /// element type. + static bool isValidElementType(const Type *ElemTy); + /// @brief Return the address space of the Pointer type. inline unsigned getAddressSpace() const { return AddressSpace; } diff --git a/include/llvm/Type.h b/include/llvm/Type.h index 5ce23ef4e4b75..c1732af09bdd4 100644 --- a/include/llvm/Type.h +++ b/include/llvm/Type.h @@ -205,7 +205,7 @@ public: inline bool isAbstract() const { return Abstract; } /// canLosslesslyBitCastTo - Return true if this type could be converted - /// with a lossless BitCast to type 'Ty'. For example, uint to int. BitCasts + /// with a lossless BitCast to type 'Ty'. For example, i8* to i32*. BitCasts /// are valid for types of the same size only where no re-interpretation of /// the bits is done. /// @brief Determine if this type could be losslessly bitcast to Ty |
