19 assert(llvm::all_of(types, [](
Type t) {
return t; }) &&
20 "attempting to construct a TypeRange with null types");
23 :
TypeRange(values.begin().getBase(), values.size()) {}
25 :
TypeRange(values.getBase(), values.size()) {}
27 :
TypeRange(values.data(), values.size()) {}
34 else if (
auto *operand = owner.dyn_cast<
OpOperand *>())
37 this->base = owner.get<
const Value *>();
42 if (
const auto *
value =
object.dyn_cast<const Value *>())
43 return {
value + index};
44 if (
auto *operand =
object.dyn_cast<OpOperand *>())
45 return {operand + index};
46 if (
auto *result =
object.dyn_cast<detail::OpResultImpl *>())
47 return {result->getNextResultAtOffset(index)};
48 return {
object.dyn_cast<
const Type *>() + index};
52 Type TypeRange::dereference_iterator(
OwnerT object, ptrdiff_t index) {
53 if (
const auto *
value =
object.dyn_cast<const Value *>())
54 return (
value + index)->getType();
55 if (
auto *operand =
object.dyn_cast<OpOperand *>())
56 return (operand + index)->get().getType();
57 if (
auto *result =
object.dyn_cast<detail::OpResultImpl *>())
58 return result->getNextResultAtOffset(index)->getType();
TODO: Remove this file when SCCP and integer range analysis have been ported to the new framework...
This class implements the result iterators for the Operation class.
static constexpr const bool value
TypeRange(ArrayRef< Type > types=llvm::None)
This class provides an abstraction over the various different ranges of value types.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
This class represents an operand of an operation.
This class implements the operand iterators for the Operation class.
This class provides the implementation for an operation result.
This class provides an abstraction over the different types of ranges over Values.