15 #ifndef LLVM_IR_GETELEMENTPTRTYPEITERATOR_H 16 #define LLVM_IR_GETELEMENTPTRTYPEITERATOR_H 31 template<
typename ItTy = User::const_op_iterator>
33 :
public std::iterator<std::forward_iterator_tag, Type *, ptrdiff_t> {
34 using super = std::iterator<std::forward_iterator_tag, Type *, ptrdiff_t>;
38 enum : uint64_t { Unbounded = -1ull };
39 uint64_t NumElements = Unbounded;
58 return OpIt == x.OpIt;
79 if (
auto *STy = dyn_cast<SequentialType>(Ty)) {
80 CurTy = STy->getElementType();
81 NumElements = STy->getNumElements();
129 auto *GEPOp = cast<GEPOperator>(
GEP);
131 GEPOp->getSourceElementType(),
140 auto &GEPOp = cast<GEPOperator>(
GEP);
142 GEPOp.getSourceElementType(),
164 #endif // LLVM_IR_GETELEMENTPTRTYPEITERATOR_H bool isBoundedSequential() const
This class represents lattice values for constants.
gep_type_iterator gep_type_end(const User *GEP)
StructType * getStructType() const
Class to represent struct types.
generic_gep_type_iterator & operator++()
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static generic_gep_type_iterator end(ItTy It)
The instances of the Type class are immutable: once they are created, they are never changed...
bool operator!=(const generic_gep_type_iterator &x) const
T dyn_cast() const
Returns the current pointer if it is of the specified pointer type, otherwises returns null...
Type * getIndexedType() const
StructType * getStructTypeOrNull() const
static generic_gep_type_iterator begin(Type *Ty, ItTy It)
bool isSequential() const
generic_gep_type_iterator operator++(int)
uint64_t getSequentialNumElements() const
Value * getOperand() const
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
T get() const
Returns the value of the specified pointer type.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
int is() const
Test if the Union currently holds the type matching T.
bool operator==(const generic_gep_type_iterator &x) const
A discriminated union of two pointer types, with the discriminator in the low bit of the pointer...
gep_type_iterator gep_type_begin(const User *GEP)