My Project
|
#include <Function.h>
Public Member Functions | |
void | print (OpAsmPrinter &p) |
LogicalResult | verify () |
void | eraseArgument (unsigned argIndex) |
Erase a single argument at argIndex . More... | |
void | eraseArguments (ArrayRef< unsigned > argIndices) |
FunctionType | getType () |
Returns the type of this function. More... | |
void | setType (FunctionType newType) |
FuncOp | clone (BlockAndValueMapping &mapper) |
FuncOp | clone () |
void | cloneInto (FuncOp dest, BlockAndValueMapping &mapper) |
Block * | addEntryBlock () |
Block * | addBlock () |
Region * | getCallableRegion (CallInterfaceCallable callable) |
void | getCallableRegions (SmallVectorImpl< Region *> &callables) |
Returns all of the callable regions of this operation. More... | |
ArrayRef< Type > | getCallableResults (Region *region) |
![]() | |
Operation * | getOperation () |
Return the operation that this refers to. More... | |
FuncOp | clone () |
Create a deep copy of this operation. More... | |
FuncOp | cloneWithoutRegions () |
Dialect * | getDialect () |
Return the dialect that this refers to. More... | |
Region * | getParentRegion () |
Return the parent Region of this operation. More... | |
Op () | |
This is a public constructor. Any op can be initialized to null. More... | |
Op (std::nullptr_t) | |
Op (Operation *state) | |
const void * | getAsOpaquePointer () const |
Methods for supporting PointerLikeTypeTraits. More... | |
![]() | |
operator bool () | |
Ops are pointer-like, so we allow implicit conversion to bool. More... | |
operator Operation * () const | |
This implicitly converts to Operation*. More... | |
Operation * | getOperation () |
Return the operation that this refers to. More... | |
Operation * | getParentOp () |
template<typename OpTy > | |
OpTy | getParentOfType () |
Return the closest surrounding parent operation that is of type 'OpTy'. More... | |
MLIRContext * | getContext () |
Return the context this operation belongs to. More... | |
void | print (raw_ostream &os, OpPrintingFlags flags=llvm::None) |
Print the operation to the given stream. More... | |
void | dump () |
Dump this operation. More... | |
Location | getLoc () |
The source location the operation was defined or derived from. More... | |
void | setLoc (Location loc) |
ArrayRef< NamedAttribute > | getAttrs () |
Return all of the attributes on this operation. More... | |
dialect_attr_range | getDialectAttrs () |
Return a range corresponding to the dialect attributes for this operation. More... | |
dialect_attr_iterator | dialect_attr_begin () |
dialect_attr_iterator | dialect_attr_end () |
Attribute | getAttr (StringRef name) |
Return an attribute with the specified name. More... | |
template<typename AttrClass > | |
AttrClass | getAttrOfType (StringRef name) |
If the operation has an attribute of the specified type, return it. More... | |
void | setAttr (Identifier name, Attribute value) |
void | setAttr (StringRef name, Attribute value) |
void | setAttrs (ArrayRef< NamedAttribute > attributes) |
Set the attributes held by this operation. More... | |
void | setAttrs (NamedAttributeList newAttrs) |
template<typename DialectAttrs > | |
void | setDialectAttrs (DialectAttrs &&attrs) |
Set the dialect attributes for this operation, and preserve all dependent. More... | |
NamedAttributeList::RemoveResult | removeAttr (Identifier name) |
NamedAttributeList::RemoveResult | removeAttr (StringRef name) |
bool | use_empty () |
Return true if there are no users of any results of this operation. More... | |
void | erase () |
Remove this operation from its parent block and delete it. More... | |
InFlightDiagnostic | emitOpError (const Twine &message={}) |
InFlightDiagnostic | emitError (const Twine &message={}) |
InFlightDiagnostic | emitWarning (const Twine &message={}) |
InFlightDiagnostic | emitRemark (const Twine &message={}) |
template<typename FnT , typename RetT = detail::walkResultType<FnT>> | |
RetT | walk (FnT &&callback) |
![]() | |
LogicalResult | fold (ArrayRef< Attribute > operands, SmallVectorImpl< OpFoldResult > &results) |
Friends | |
class | OpTrait::FunctionLike< FuncOp > |
FuncOp represents a function, or an operation containing one region that forms a CFG(Control Flow Graph). The region of a function is not allowed to implicitly capture global values, and all external references must use Function arguments or attributes that establish a symbolic connection(e.g. symbols referenced by name via a string attribute).
Block * FuncOp::addBlock | ( | ) |
Add a normal block to the end of the function's block list. The function should at least already have an entry block.
Block * FuncOp::addEntryBlock | ( | ) |
Add an entry block to an empty function, and set up the block arguments to match the signature of the function. The newly inserted entry block is returned.
Add an entry block to an empty function, and set up the block arguments to match the signature of the function.
|
static |
|
static |
FuncOp FuncOp::clone | ( | BlockAndValueMapping & | mapper | ) |
Create a deep copy of this function and all of its blocks, remapping any operands that use values outside of the function using the map that is provided (leaving them alone if no entry is present). If the mapper contains entries for function arguments, these arguments are not included in the new function. Replaces references to cloned sub-values with the corresponding value that is copied, and adds those mappings to the mapper.
Create a deep copy of this function and all of its blocks, remapping any operands that use values outside of the function using the map that is provided (leaving them alone if no entry is present). Replaces references to cloned sub-values with the corresponding value that is copied, and adds those mappings to the mapper.
Set the argument attributes for arguments that aren't being replaced.
Clone the current function into the new one and return it.
FuncOp FuncOp::clone | ( | ) |
void FuncOp::cloneInto | ( | FuncOp | dest, |
BlockAndValueMapping & | mapper | ||
) |
Clone the internal blocks and attributes from this function into dest. Any cloned blocks are appended to the back of dest. This function asserts that the attributes of the current function and dest are compatible.
Clone the internal blocks from this function into dest and all attributes from this function to dest.
|
static |
|
static |
|
static |
|
inline |
Erase a single argument at argIndex
.
void FuncOp::eraseArguments | ( | ArrayRef< unsigned > | argIndices | ) |
Erases the arguments listed in argIndices
. argIndices
is allowed to have duplicates and can be in any order.
|
inline |
Returns a region on the current operation that the given callable refers to. This may return null in the case of an external callable object, e.g. an external function.
|
inline |
Returns all of the callable regions of this operation.
Returns the results types that the given callable region produces when executed.
|
inlinestatic |
|
inline |
Returns the type of this function.
|
static |
Operation hooks.
Parsing/Printing methods.
void FuncOp::print | ( | OpAsmPrinter & | p | ) |
|
inline |
Change the type of this function in place. This is an extremely dangerous operation and it is up to the caller to ensure that this is legal for this function, and to restore invariants:
LogicalResult FuncOp::verify | ( | ) |
|
friend |