|
clang 24.0.0git
|
CIR-specific implementation of mlir::abi::ABIRewriteContext. More...
Public Member Functions | |
| CIRABIRewriteContext (mlir::ModuleOp module, const mlir::DataLayout &dl) | |
| mlir::LogicalResult | rewriteFunctionDefinition (mlir::FunctionOpInterface funcOp, const mlir::abi::FunctionClassification &fc, mlir::OpBuilder &builder) override |
| mlir::LogicalResult | rewriteCallSite (mlir::Operation *callOp, const mlir::abi::FunctionClassification &fc, mlir::OpBuilder &builder) override |
| void | rewriteFunctionAddress (cir::GetGlobalOp addrOp, cir::FuncOp funcOp, mlir::OpBuilder &builder) |
Retype addrOp, which holds the address of funcOp, to the signature funcOp was rewritten to, and cast it back so existing uses keep the type they were built for. | |
| mlir::StringRef | getDialectNamespace () const override |
CIR-specific implementation of mlir::abi::ABIRewriteContext.
The driver pass (CallConvLoweringPass) computes a FunctionClassification for each cir.func / cir.call and dispatches to this class to perform the actual IR rewriting using cir dialect operations.
Holds a reference to the module's DataLayout for coercion alignment queries. The DataLayout must outlive the rewrite context.
Definition at line 38 of file CIRABIRewriteContext.h.
|
inline |
Definition at line 40 of file CIRABIRewriteContext.h.
|
inlineoverride |
Definition at line 61 of file CIRABIRewriteContext.h.
|
override |
Definition at line 1117 of file CIRABIRewriteContext.cpp.
References cir::RecordType::isStruct().
| void CIRABIRewriteContext::rewriteFunctionAddress | ( | cir::GetGlobalOp | addrOp, |
| cir::FuncOp | funcOp, | ||
| mlir::OpBuilder & | builder ) |
Retype addrOp, which holds the address of funcOp, to the signature funcOp was rewritten to, and cast it back so existing uses keep the type they were built for.
A no-op when the ABI left funcOp's type alone. Call after funcOp has been rewritten. Not an override, since taking a function's address has no counterpart in the generic contract.
Definition at line 1318 of file CIRABIRewriteContext.cpp.
|
override |
Definition at line 943 of file CIRABIRewriteContext.cpp.