MLIR
20.0.0git
|
This interface provides the hooks into the inlining interface. More...
#include "mlir/Transforms/InliningUtils.h"
Public Member Functions | |
virtual void | processInlinedBlocks (iterator_range< Region::iterator > inlinedBlocks) |
Process a set of blocks that have been inlined. More... | |
virtual bool | isLegalToInline (Operation *call, Operation *callable, bool wouldBeCloned) const |
These hooks mirror the hooks for the DialectInlinerInterface, with default implementations that call the hook on the handler for the dialect 'op' is registered to. More... | |
virtual bool | isLegalToInline (Region *dest, Region *src, bool wouldBeCloned, IRMapping &valueMapping) const |
virtual bool | isLegalToInline (Operation *op, Region *dest, bool wouldBeCloned, IRMapping &valueMapping) const |
virtual bool | shouldAnalyzeRecursively (Operation *op) const |
virtual void | handleTerminator (Operation *op, Block *newDest) const |
Handle the given inlined terminator by replacing it with a new operation as necessary. More... | |
virtual void | handleTerminator (Operation *op, ValueRange valuesToRepl) const |
Handle the given inlined terminator by replacing it with a new operation as necessary. More... | |
virtual Value | handleArgument (OpBuilder &builder, Operation *call, Operation *callable, Value argument, DictionaryAttr argumentAttrs) const |
virtual Value | handleResult (OpBuilder &builder, Operation *call, Operation *callable, Value result, DictionaryAttr resultAttrs) const |
virtual void | processInlinedCallBlocks (Operation *call, iterator_range< Region::iterator > inlinedBlocks) const |
Public Member Functions inherited from mlir::DialectInterfaceCollection< DialectInlinerInterface > | |
DialectInterfaceCollection (MLIRContext *ctx) | |
Collect the registered dialect interfaces within the provided context. More... | |
const DialectInlinerInterface * | getInterfaceFor (Object *obj) const |
Get the interface for a given object, or null if one is not registered. More... | |
iterator | begin () const |
iterator | end () const |
Public Member Functions inherited from mlir::detail::DialectInterfaceCollectionBase | |
DialectInterfaceCollectionBase (MLIRContext *ctx, TypeID interfaceKind, StringRef interfaceName) | |
virtual | ~DialectInterfaceCollectionBase () |
Additional Inherited Members | |
Public Types inherited from mlir::DialectInterfaceCollection< DialectInlinerInterface > | |
using | Base = DialectInterfaceCollection< DialectInlinerInterface > |
using | iterator = detail::DialectInterfaceCollectionBase::iterator< DialectInlinerInterface > |
Iterator access to the held interfaces. More... | |
Protected Member Functions inherited from mlir::detail::DialectInterfaceCollectionBase | |
const DialectInterface * | getInterfaceFor (Operation *op) const |
Get the interface for the dialect of given operation, or null if one is not registered. More... | |
const DialectInterface * | getInterfaceFor (Dialect *dialect) const |
Get the interface for the given dialect. More... | |
template<typename InterfaceT > | |
iterator< InterfaceT > | interface_begin () const |
Iterator access to the held interfaces. More... | |
template<typename InterfaceT > | |
iterator< InterfaceT > | interface_end () const |
This interface provides the hooks into the inlining interface.
Note: this class automatically collects 'DialectInlinerInterface' objects registered to each dialect within the given context.
Definition at line 184 of file InliningUtils.h.
|
virtual |
Definition at line 121 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
Referenced by handleArgumentImpl().
|
virtual |
Definition at line 130 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
Referenced by handleResultImpl().
Handle the given inlined terminator by replacing it with a new operation as necessary.
Definition at line 106 of file InliningUtils.cpp.
|
virtual |
Handle the given inlined terminator by replacing it with a new operation as necessary.
Definition at line 114 of file InliningUtils.cpp.
|
virtual |
These hooks mirror the hooks for the DialectInlinerInterface, with default implementations that call the hook on the handler for the dialect 'op' is registered to.
Definition at line 76 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
|
virtual |
Definition at line 91 of file InliningUtils.cpp.
|
virtual |
Definition at line 83 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor(), and mlir::Region::getParentOp().
|
inlinevirtual |
Process a set of blocks that have been inlined.
This callback is invoked before inlined terminator operations have been processed.
Definition at line 192 of file InliningUtils.h.
|
virtual |
Definition at line 138 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
|
virtual |
Definition at line 99 of file InliningUtils.cpp.