MLIR  20.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:

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 = 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=std::nullopt)
 
 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 377 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 385 of file ValueRange.h.

◆ type_iterator

Returns the types of the values within this range.

Definition at line 409 of file ValueRange.h.

◆ type_range

Definition at line 410 of file ValueRange.h.

Constructor & Destructor Documentation

◆ ValueRange() [1/9]

template<typename Arg , 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 394 of file ValueRange.h.

◆ ValueRange() [2/9]

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

Definition at line 395 of file ValueRange.h.

◆ ValueRange() [3/9]

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

Definition at line 396 of file ValueRange.h.

◆ ValueRange() [4/9]

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

Definition at line 398 of file ValueRange.h.

◆ ValueRange() [5/9]

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

Definition at line 400 of file ValueRange.h.

◆ ValueRange() [6/9]

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

Definition at line 402 of file ValueRange.h.

◆ ValueRange() [7/9]

mlir::ValueRange::ValueRange ( ArrayRef< Value values = std::nullopt)

◆ ValueRange() [8/9]

mlir::ValueRange::ValueRange ( OperandRange  values)

◆ ValueRange() [9/9]

mlir::ValueRange::ValueRange ( ResultRange  values)

Member Function Documentation

◆ getType()

type_range mlir::ValueRange::getType ( ) const

◆ getTypes()

type_range mlir::ValueRange::getTypes ( ) const

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