32 bool wouldBeCloned)
const final {
54 auto returnOp = dyn_cast<ReturnOp>(op);
60 builder.create<cf::BranchOp>(op->getLoc(), newDest, returnOp.getOperands());
68 auto returnOp = cast<ReturnOp>(op);
71 assert(returnOp.getNumOperands() == valuesToRepl.size());
73 valuesToRepl[it.index()].replaceAllUsesWith(it.value());
84 dialect->addInterfaces<FuncInlinerInterface>();
static bool isLegalToInline(InlinerInterface &interface, Region *src, Region *insertRegion, bool shouldCloneInlinedRegion, IRMapping &valueMapping)
Utility to check that all of the operations within 'src' can be inlined.
Block represents an ordered list of Operations.
This is the interface that must be implemented by the dialects of operations to be inlined.
DialectInlinerInterface(Dialect *dialect)
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
bool addExtension(TypeID extensionID, std::unique_ptr< DialectExtensionBase > extension)
Add the given extension to the registry.
This is a utility class for mapping one set of IR entities to another.
MLIRContext is the top-level object for a collection of MLIR operations.
T * getOrLoadDialect()
Get (or create) a dialect for the given derived dialect type.
This class helps build Operations.
Operation is the basic unit of execution within MLIR.
This class contains a list of basic blocks and a link to the parent operation it is attached to.
This class provides an abstraction over the different types of ranges over Values.
constexpr void enumerate(std::tuple< Tys... > &tuple, CallbackT &&callback)
void registerInlinerExtension(DialectRegistry ®istry)
Register the extension used to support inlining the func dialect.
Include the generated interface declarations.