MLIR  22.0.0git
Namespaces | Functions
mlir::func Namespace Reference

Namespaces

 arith
 

Functions

void registerAllExtensions (DialectRegistry &registry)
 Register all extensions of the func dialect. More...
 
void registerInlinerExtension (DialectRegistry &registry)
 Register the extension used to support inlining the func dialect. More...
 
void registerShardingInterfaceExternalModels (DialectRegistry &registry)
 
void registerTransformDialectExtension (DialectRegistry &registry)
 
FailureOr< FuncOp > replaceFuncWithNewOrder (RewriterBase &rewriter, FuncOp funcOp, llvm::ArrayRef< unsigned > newArgsOrder, llvm::ArrayRef< unsigned > newResultsOrder)
 Creates a new function operation with the same name as the original function operation, but with the arguments reordered according to the newArgsOrder and newResultsOrder. More...
 
CallOp replaceCallOpWithNewOrder (RewriterBase &rewriter, CallOp callOp, llvm::ArrayRef< unsigned > newArgsOrder, llvm::ArrayRef< unsigned > newResultsOrder)
 Creates a new call operation with the values as the original call operation, but with the arguments reordered according to the newArgsOrder and newResultsOrder. More...
 

Function Documentation

◆ registerAllExtensions()

void mlir::func::registerAllExtensions ( DialectRegistry registry)

Register all extensions of the func dialect.

This should generally only be used by tools, or other use cases that really do want all extensions of the dialect. All other cases should prefer to instead register the specific extensions they intend to take advantage of.

Definition at line 15 of file AllExtensions.cpp.

References registerInlinerExtension(), and mlir::arith::registerShardingInterfaceExternalModels().

Referenced by mlir::registerAllExtensions().

◆ registerInlinerExtension()

void mlir::func::registerInlinerExtension ( DialectRegistry registry)

Register the extension used to support inlining the func dialect.

Definition at line 86 of file InlinerExtension.cpp.

References mlir::DialectRegistry::addExtension(), and mlir::MLIRContext::getOrLoadDialect().

Referenced by registerAllExtensions().

◆ registerShardingInterfaceExternalModels()

void mlir::func::registerShardingInterfaceExternalModels ( DialectRegistry registry)

Definition at line 16 of file MeshShardingExtensions.cpp.

References mlir::DialectRegistry::addExtension().

◆ registerTransformDialectExtension()

void mlir::func::registerTransformDialectExtension ( DialectRegistry registry)

Definition at line 360 of file FuncTransformOps.cpp.

References mlir::DialectRegistry::addExtensions().

Referenced by mlir::registerAllExtensions().

◆ replaceCallOpWithNewOrder()

CallOp mlir::func::replaceCallOpWithNewOrder ( RewriterBase rewriter,
CallOp  callOp,
llvm::ArrayRef< unsigned >  newArgsOrder,
llvm::ArrayRef< unsigned >  newResultsOrder 
)

Creates a new call operation with the values as the original call operation, but with the arguments reordered according to the newArgsOrder and newResultsOrder.

◆ replaceFuncWithNewOrder()

FailureOr<FuncOp> mlir::func::replaceFuncWithNewOrder ( RewriterBase rewriter,
FuncOp  funcOp,
llvm::ArrayRef< unsigned >  newArgsOrder,
llvm::ArrayRef< unsigned >  newResultsOrder 
)

Creates a new function operation with the same name as the original function operation, but with the arguments reordered according to the newArgsOrder and newResultsOrder.

The funcOp operation must have exactly one block. Returns the new function operation or failure if funcOp doesn't have exactly one block.