MLIR  15.0.0git
Public Types | Public Member Functions | List of all members
mlir::ValueRange Class Referencefinal

This class provides an abstraction over the different types of ranges over Values. More...

#include "mlir/IR/OperationSupport.h"

+ Inheritance diagram for mlir::ValueRange:
+ Collaboration diagram for mlir::ValueRange:

Public Types

using OwnerT = PointerUnion< const Value *, OpOperand *, detail::OpResultImpl * >
 The type representing the owner of a ValueRange. More...
 
using type_iterator = ValueTypeIterator< iterator >
 Returns the types of the values within this range. More...
 
using type_range = ValueTypeRange< ValueRange >
 

Public Member Functions

template<typename Arg , typename = typename std::enable_if_t< std::is_constructible<ArrayRef<Value>, Arg>::value && !std::is_convertible<Arg, Value>::value>>
 ValueRange (Arg &&arg)
 
 ValueRange (const Value &value)
 
 ValueRange (const std::initializer_list< Value > &values)
 
 ValueRange (iterator_range< OperandRange::iterator > values)
 
 ValueRange (iterator_range< ResultRange::iterator > values)
 
 ValueRange (ArrayRef< BlockArgument > values)
 
 ValueRange (ArrayRef< Value > values=llvm::None)
 
 ValueRange (OperandRange values)
 
 ValueRange (ResultRange values)
 
type_range getTypes () const
 
auto getType () const
 

Detailed Description

This class provides an abstraction over the different types of ranges over Values.

In many cases, this prevents the need to explicitly materialize a SmallVector/std::vector. This class should be used in places that are not suitable for a more derived type (e.g. ArrayRef) or a template range parameter.

Definition at line 1128 of file OperationSupport.h.

Member Typedef Documentation

◆ OwnerT

The type representing the owner of a ValueRange.

This is either a list of values, operands, or results.

Definition at line 1137 of file OperationSupport.h.

◆ type_iterator

Returns the types of the values within this range.

Definition at line 1160 of file OperationSupport.h.

◆ type_range

Definition at line 1161 of file OperationSupport.h.

Constructor & Destructor Documentation

◆ ValueRange() [1/9]

template<typename Arg , typename = typename std::enable_if_t< std::is_constructible<ArrayRef<Value>, Arg>::value && !std::is_convertible<Arg, Value>::value>>
mlir::ValueRange::ValueRange ( Arg &&  arg)
inline

Definition at line 1145 of file OperationSupport.h.

◆ ValueRange() [2/9]

mlir::ValueRange::ValueRange ( const Value value)
inline

Definition at line 1146 of file OperationSupport.h.

◆ ValueRange() [3/9]

mlir::ValueRange::ValueRange ( const std::initializer_list< Value > &  values)
inline

Definition at line 1147 of file OperationSupport.h.

◆ ValueRange() [4/9]

mlir::ValueRange::ValueRange ( iterator_range< OperandRange::iterator >  values)
inline

Definition at line 1149 of file OperationSupport.h.

◆ ValueRange() [5/9]

mlir::ValueRange::ValueRange ( iterator_range< ResultRange::iterator >  values)
inline

Definition at line 1151 of file OperationSupport.h.

◆ ValueRange() [6/9]

mlir::ValueRange::ValueRange ( ArrayRef< BlockArgument values)
inline

Definition at line 1153 of file OperationSupport.h.

◆ ValueRange() [7/9]

ValueRange::ValueRange ( ArrayRef< Value values = llvm::None)

Definition at line 596 of file OperationSupport.cpp.

◆ ValueRange() [8/9]

ValueRange::ValueRange ( OperandRange  values)

Definition at line 598 of file OperationSupport.cpp.

◆ ValueRange() [9/9]

ValueRange::ValueRange ( ResultRange  values)

Definition at line 600 of file OperationSupport.cpp.

References value.

Member Function Documentation

◆ getType()

auto mlir::ValueRange::getType ( ) const
inline

◆ getTypes()

type_range mlir::ValueRange::getTypes ( ) const
inline

The documentation for this class was generated from the following files: