|
clang 24.0.0git
|
Classifies through the LLVM ABI Lowering Library. More...
Public Member Functions | |
| std::optional< mlir::abi::FunctionClassification > | classifyFunction (cir::FuncOp func) override |
| Classify a cir.func using the LLVM ABI library. | |
| std::optional< mlir::abi::FunctionClassification > | classifyVariadicCall (cir::CIRCallOpInterface call, cir::FuncOp callee) override |
| The call is classified at the callee's features, not the caller's, because the pass rewrites the definition and its call sites from one classification. | |
| std::optional< mlir::abi::FunctionClassification > | classifyIndirectCall (cir::CIRCallOpInterface call) override |
| A callee resolved at run time carries no features of its own, so the call is classified at the features of the function containing it, which is the declaration classic arranges every call site from. | |
| Public Member Functions inherited from cir::CIRABIClassifier | |
| virtual | ~CIRABIClassifier ()=default |
| virtual std::optional< mlir::abi::ArgClassification > | classifyVAArg (cir::VAArgOp vaArg)=0 |
Classify the type fetched by vaArg as an unnamed argument with a full register budget. | |
Protected Member Functions | |
| CIRABIClassifierCommon (const mlir::DataLayout &dl, mlir::ModuleOp modOp) | |
| virtual const llvm::abi::TargetInfo & | getTargetInfo (cir::FuncOp featureSource)=0 |
| The library classifier for a function whose recorded target features may refine the ABI rules. | |
| std::optional< mlir::abi::ArgClassification > | classifyVarArgType (mlir::Type ty, const llvm::abi::TargetInfo &targetInfo, llvm::function_ref< mlir::InFlightDiagnostic()> emitError) |
Classify ty, the type fetched by a cir.va_arg, as an unnamed argument with every argument register free. | |
Protected Attributes | |
| const mlir::DataLayout & | dl |
| mlir::ModuleOp | modOp |
| mlir::abi::ABITypeMapper | typeMapper |
Classifies through the LLVM ABI Lowering Library.
The signature's CIR types are mapped to llvm::abi types, the target's TargetInfo classifies them, and each llvm::abi::ArgInfo is converted to an ArgClassification.
A subclass supplies the TargetInfo and classifies cir.va_arg, whose expansion is specific to each target.
Definition at line 96 of file CIRABIClassifier.h.
|
inlineprotected |
Definition at line 119 of file CIRABIClassifier.h.
References dl, modOp, and typeMapper.
|
overridevirtual |
Classify a cir.func using the LLVM ABI library.
Returns std::nullopt and emits an NYI error if the signature uses a type the bridge does not handle yet.
Implements cir::CIRABIClassifier.
Definition at line 798 of file CallConvLoweringPass.cpp.
References cir::convertCallingConv(), getTargetInfo(), and cir::requiredArgs().
|
overridevirtual |
A callee resolved at run time carries no features of its own, so the call is classified at the features of the function containing it, which is the declaration classic arranges every call site from.
A call that passes arguments through an ellipsis is classified from its own operands, as a direct one is.
Implements cir::CIRABIClassifier.
Definition at line 42 of file CIRABIClassifier.cpp.
References classifyVariadicCall(), cir::getIndirectCalleeType(), getTargetInfo(), and cir::requiredArgs().
|
protected |
Classify ty, the type fetched by a cir.va_arg, as an unnamed argument with every argument register free.
Classify the single type fetched by a cir.va_arg as an unnamed argument (RequiredArgs(0)) with a full register budget.
Returns std::nullopt and emits an NYI error if the type is not one this bridge handles.
Definition at line 809 of file CallConvLoweringPass.cpp.
References modOp.
|
overridevirtual |
The call is classified at the callee's features, not the caller's, because the pass rewrites the definition and its call sites from one classification.
Classic instead arranges every call site from the caller and reports a caller whose features disagree with its callee in checkFunctionCallABI, which has no equivalent here yet.
Implements cir::CIRABIClassifier.
Definition at line 34 of file CIRABIClassifier.cpp.
References classifyVariadicCall(), cir::convertCallingConv(), and getTargetInfo().
Referenced by classifyIndirectCall(), and classifyVariadicCall().
|
protectedpure virtual |
The library classifier for a function whose recorded target features may refine the ABI rules.
Referenced by classifyFunction(), classifyIndirectCall(), and classifyVariadicCall().
|
protected |
Definition at line 133 of file CIRABIClassifier.h.
Referenced by CIRABIClassifierCommon().
|
protected |
Definition at line 134 of file CIRABIClassifier.h.
Referenced by CIRABIClassifierCommon(), and classifyVarArgType().
|
protected |
Definition at line 135 of file CIRABIClassifier.h.
Referenced by CIRABIClassifierCommon().