MLIR
21.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 |
virtual bool | allowSingleBlockOptimization (iterator_range< Region::iterator > inlinedBlocks) const |
Returns true if the inliner can assume a fast path of not creating a new block, if there is only one block. More... | |
![]() | |
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 |
![]() | |
DialectInterfaceCollectionBase (MLIRContext *ctx, TypeID interfaceKind, StringRef interfaceName) | |
virtual | ~DialectInterfaceCollectionBase () |
Additional Inherited Members | |
![]() | |
using | Base = DialectInterfaceCollection< DialectInlinerInterface > |
using | iterator = detail::DialectInterfaceCollectionBase::iterator< DialectInlinerInterface > |
Iterator access to the held interfaces. More... | |
![]() | |
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 191 of file InliningUtils.h.
|
virtual |
Returns true if the inliner can assume a fast path of not creating a new block, if there is only one block.
Definition at line 146 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
|
virtual |
Definition at line 156 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
Referenced by handleArgumentImpl().
|
virtual |
Definition at line 165 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 129 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
|
virtual |
Handle the given inlined terminator by replacing it with a new operation as necessary.
Definition at line 137 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
|
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 99 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
Referenced by mlir::inlineCall(), and isLegalToInline().
|
virtual |
Definition at line 114 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
|
virtual |
Definition at line 106 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 199 of file InliningUtils.h.
|
virtual |
Definition at line 173 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
|
virtual |
Definition at line 122 of file InliningUtils.cpp.
References mlir::DialectInterfaceCollection< DialectInlinerInterface >::getInterfaceFor().
Referenced by isLegalToInline().