My Project
Public Member Functions | Public Attributes | List of all members
mlir::OperationState Struct Reference

#include <OperationSupport.h>

Collaboration diagram for mlir::OperationState:
Collaboration graph
[legend]

Public Member Functions

 OperationState (Location location, StringRef name)
 
 OperationState (Location location, OperationName name)
 
 OperationState (Location location, StringRef name, ValueRange operands, ArrayRef< Type > types, ArrayRef< NamedAttribute > attributes, ArrayRef< Block *> successors={}, MutableArrayRef< std::unique_ptr< Region >> regions={}, bool resizableOperandList=false)
 
void addOperands (ValueRange newOperands)
 
void addTypes (ArrayRef< Type > newTypes)
 
void addAttribute (StringRef name, Attribute attr)
 Add an attribute with the specified name. More...
 
void addAttribute (Identifier name, Attribute attr)
 Add an attribute with the specified name. More...
 
void addAttributes (ArrayRef< NamedAttribute > newAttributes)
 Add an array of named attributes. More...
 
void addSuccessor (Block *successor, ValueRange succOperands)
 
RegionaddRegion ()
 
void addRegion (std::unique_ptr< Region > &&region)
 
void setOperandListToResizable (bool isResizable=true)
 Sets the operand list of the operation as resizable. More...
 
MLIRContextgetContext ()
 Get the context held by this operation state. More...
 

Public Attributes

Location location
 
OperationName name
 
SmallVector< Value, 4 > operands
 
SmallVector< Type, 4 > types
 Types of the results of this operation. More...
 
SmallVector< NamedAttribute, 4 > attributes
 
SmallVector< Block *, 1 > successors
 Successors of this operation and their respective operands. More...
 
SmallVector< std::unique_ptr< Region >, 1 > regions
 Regions that the op will hold. More...
 
bool resizableOperandList = false
 If the operation has a resizable operand list. More...
 

Detailed Description

This represents an operation in an abstracted form, suitable for use with the builder APIs. This object is a large and heavy weight object meant to be used as a temporary object on the stack. It is generally unwise to put this in a collection.

Constructor & Destructor Documentation

◆ OperationState() [1/3]

OperationState::OperationState ( Location  location,
StringRef  name 
)

◆ OperationState() [2/3]

OperationState::OperationState ( Location  location,
OperationName  name 
)

◆ OperationState() [3/3]

OperationState::OperationState ( Location  location,
StringRef  name,
ValueRange  operands,
ArrayRef< Type types,
ArrayRef< NamedAttribute attributes,
ArrayRef< Block *>  successors = {},
MutableArrayRef< std::unique_ptr< Region >>  regions = {},
bool  resizableOperandList = false 
)

Member Function Documentation

◆ addAttribute() [1/2]

void mlir::OperationState::addAttribute ( StringRef  name,
Attribute  attr 
)
inline

Add an attribute with the specified name.

◆ addAttribute() [2/2]

void mlir::OperationState::addAttribute ( Identifier  name,
Attribute  attr 
)
inline

Add an attribute with the specified name.

◆ addAttributes()

void mlir::OperationState::addAttributes ( ArrayRef< NamedAttribute newAttributes)
inline

Add an array of named attributes.

◆ addOperands()

void OperationState::addOperands ( ValueRange  newOperands)

◆ addRegion() [1/2]

Region * OperationState::addRegion ( )

Create a region that should be attached to the operation. These regions can be filled in immediately without waiting for Operation to be created. When it is, the region bodies will be transferred.

◆ addRegion() [2/2]

void OperationState::addRegion ( std::unique_ptr< Region > &&  region)

Take a region that should be attached to the Operation. The body of the region will be transferred when the Operation is constructed. If the region is null, a new empty region will be attached to the Operation.

◆ addSuccessor()

void OperationState::addSuccessor ( Block successor,
ValueRange  succOperands 
)

◆ addTypes()

void mlir::OperationState::addTypes ( ArrayRef< Type newTypes)
inline

◆ getContext()

MLIRContext* mlir::OperationState::getContext ( )
inline

Get the context held by this operation state.

◆ setOperandListToResizable()

void mlir::OperationState::setOperandListToResizable ( bool  isResizable = true)
inline

Sets the operand list of the operation as resizable.

Member Data Documentation

◆ attributes

SmallVector<NamedAttribute, 4> mlir::OperationState::attributes

◆ location

Location mlir::OperationState::location

◆ name

OperationName mlir::OperationState::name

◆ operands

SmallVector<Value, 4> mlir::OperationState::operands

◆ regions

SmallVector<std::unique_ptr<Region>, 1> mlir::OperationState::regions

Regions that the op will hold.

◆ resizableOperandList

bool mlir::OperationState::resizableOperandList = false

If the operation has a resizable operand list.

◆ successors

SmallVector<Block *, 1> mlir::OperationState::successors

Successors of this operation and their respective operands.

◆ types

SmallVector<Type, 4> mlir::OperationState::types

Types of the results of this operation.


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