ABIRewriteContext is the abstract interface that each dialect implements to perform ABI-specific rewrites on its operations.
More...
#include "mlir/ABI/ABIRewriteContext.h"
ABIRewriteContext is the abstract interface that each dialect implements to perform ABI-specific rewrites on its operations.
The pass orchestrator calls these methods after ABI classification to rewrite function definitions and call sites.
Definition at line 119 of file ABIRewriteContext.h.
◆ ~ABIRewriteContext()
| virtual mlir::abi::ABIRewriteContext::~ABIRewriteContext |
( |
| ) |
|
|
virtualdefault |
◆ getDialectNamespace()
| virtual StringRef mlir::abi::ABIRewriteContext::getDialectNamespace |
( |
| ) |
const |
|
pure virtual |
Return the dialect namespace this context handles (e.g. "cir").
◆ rewriteCallSite()
Rewrite a call operation to match the callee's ABI-lowered signature.
This coerces arguments, handles indirect returns (sret), and adapts the call result back to the original high-level type.
- Parameters
-
| callOp | The call operation to rewrite. |
| fc | The ABI classification for the callee. |
| rewriter | The pattern rewriter to use for modifications. |
- Returns
- success() if the call was rewritten.
◆ rewriteFunctionDefinition()
| virtual LogicalResult mlir::abi::ABIRewriteContext::rewriteFunctionDefinition |
( |
FunctionOpInterface | funcOp, |
|
|
const FunctionClassification & | fc, |
|
|
OpBuilder & | rewriter ) |
|
pure virtual |
Rewrite a function definition to use ABI-lowered types.
This creates a new function with the lowered signature, rewrites the function body to adapt between the ABI types and the original high-level types, and replaces the original function.
- Parameters
-
| funcOp | The function to rewrite (via FunctionOpInterface). |
| fc | The ABI classification for this function. |
| rewriter | The pattern rewriter to use for modifications. |
- Returns
- success() if the function was rewritten.
The documentation for this class was generated from the following file: