My Project
Public Member Functions | List of all members
mlir::edsc::BlockBuilder Class Reference

#include <Builders.h>

Inheritance diagram for mlir::edsc::BlockBuilder:
Inheritance graph
[legend]
Collaboration diagram for mlir::edsc::BlockBuilder:
Collaboration graph
[legend]

Public Member Functions

 BlockBuilder (BlockHandle bh, Append)
 
 BlockBuilder (BlockHandle *bh, ArrayRef< ValueHandle *> args)
 
void operator() (function_ref< void(void)> fun=nullptr)
 

Additional Inherited Members

- Protected Member Functions inherited from mlir::edsc::NestedBuilder
 NestedBuilder ()=default
 
 NestedBuilder (const NestedBuilder &)=delete
 
 NestedBuilder (NestedBuilder &&other)
 
NestedBuilderoperator= (const NestedBuilder &)=delete
 
NestedBuilderoperator= (NestedBuilder &&other)
 
void enter (mlir::Block *block, int prev=0)
 
void exit ()
 
 ~NestedBuilder ()
 

Detailed Description

A BlockBuilder is a NestedBuilder for mlir::Block*. This exists by opposition to LoopBuilder which is not related to an mlir::Block* but to a mlir::Value. It is meant to be used as a temporary object for representing any nested MLIR construct that is "related to" an mlir::Block*.

Constructor & Destructor Documentation

◆ BlockBuilder() [1/2]

mlir::edsc::BlockBuilder::BlockBuilder ( BlockHandle  bh,
Append   
)

Enters the mlir::Block* previously captured by bh and sets the insertion point to its end.

◆ BlockBuilder() [2/2]

mlir::edsc::BlockBuilder::BlockBuilder ( BlockHandle bh,
ArrayRef< ValueHandle *>  args 
)

Constructs a new mlir::Block with argument types derived from args. Captures the new block in bh and its arguments into args. Enters the new mlir::Block* and sets the insertion point to its end.

Prerequisites: The ValueHandle args are typed delayed ValueHandles; i.e. they are not yet bound to mlir::Value.

Member Function Documentation

◆ operator()()

void mlir::edsc::BlockBuilder::operator() ( function_ref< void(void)>  fun = nullptr)

The only purpose of this operator is to serve as a sequence point so that the evaluation of fun (which build IR snippets in a scoped fashion) is scoped within a BlockBuilder.

Only serves as an ordering point between entering nested block and creating stmts.


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