MLIR  16.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/ValueRange.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
 
type_range 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 345 of file ValueRange.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 354 of file ValueRange.h.

◆ type_iterator

Returns the types of the values within this range.

Definition at line 377 of file ValueRange.h.

◆ type_range

Definition at line 378 of file ValueRange.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 362 of file ValueRange.h.

◆ ValueRange() [2/9]

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

Definition at line 363 of file ValueRange.h.

◆ ValueRange() [3/9]

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

Definition at line 364 of file ValueRange.h.

◆ ValueRange() [4/9]

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

Definition at line 366 of file ValueRange.h.

◆ ValueRange() [5/9]

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

Definition at line 368 of file ValueRange.h.

◆ ValueRange() [6/9]

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

Definition at line 370 of file ValueRange.h.

◆ ValueRange() [7/9]

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

Definition at line 593 of file OperationSupport.cpp.

◆ ValueRange() [8/9]

ValueRange::ValueRange ( OperandRange  values)

Definition at line 595 of file OperationSupport.cpp.

◆ ValueRange() [9/9]

ValueRange::ValueRange ( ResultRange  values)

Definition at line 597 of file OperationSupport.cpp.

References value.

Member Function Documentation

◆ getType()

ValueRange::type_range ValueRange::getType ( ) const

◆ getTypes()

ValueRange::type_range ValueRange::getTypes ( ) const

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