clang 20.0.0git
|
Target specific hooks for defining how a type should be passed or returned from functions with one of the Swift calling conventions. More...
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/ABIInfo.h"
Public Member Functions | |
SwiftABIInfo (CodeGen::CodeGenTypes &CGT, bool SwiftErrorInRegister) | |
virtual | ~SwiftABIInfo () |
virtual bool | shouldPassIndirectly (ArrayRef< llvm::Type * > ComponentTys, bool AsReturnValue) const |
Returns true if an aggregate which expands to the given type sequence should be passed / returned indirectly. | |
virtual bool | isLegalVectorType (CharUnits VectorSize, llvm::Type *EltTy, unsigned NumElts) const |
Returns true if the given vector type is legal from Swift's calling convention perspective. | |
bool | isSwiftErrorInRegister () const |
Returns true if swifterror is lowered to a register by the target ABI. | |
Protected Member Functions | |
bool | occupiesMoreThan (ArrayRef< llvm::Type * > scalarTypes, unsigned maxAllRegisters) const |
Does the given lowering require more than the given number of registers when expanded? | |
Protected Attributes | |
CodeGenTypes & | CGT |
bool | SwiftErrorInRegister |
Target specific hooks for defining how a type should be passed or returned from functions with one of the Swift calling conventions.
|
inline |
|
virtualdefault |
|
virtual |
Returns true if the given vector type is legal from Swift's calling convention perspective.
Definition at line 278 of file ABIInfo.cpp.
References clang::CharUnits::getQuantity().
Referenced by clang::CodeGen::swiftcall::isLegalVectorType().
|
inline |
Returns true if swifterror is lowered to a register by the target ABI.
Definition at line 155 of file ABIInfo.h.
References SwiftErrorInRegister.
Referenced by clang::CodeGen::swiftcall::isSwiftErrorLoweredInRegister().
|
protected |
Does the given lowering require more than the given number of registers when expanded?
This is intended to be the basis of a reasonable basic implementation of should{Pass,Return}Indirectly.
For most targets, a limit of four total registers is reasonable; this limits the amount of code required in order to move around the value in case it wasn't produced immediately prior to the call by the caller (or wasn't produced in exactly the right registers) or isn't used immediately within the callee. But some targets may need to further limit the register count due to an inability to support that many return registers.
Definition at line 255 of file ABIInfo.cpp.
References CGT, clang::Default, clang::TargetInfo::getPointerWidth(), clang::CodeGen::CodeGenTypes::getTarget(), and clang::ast_matchers::type.
Referenced by shouldPassIndirectly().
|
virtual |
Returns true if an aggregate which expands to the given type sequence should be passed / returned indirectly.
Definition at line 273 of file ABIInfo.cpp.
References occupiesMoreThan().
Referenced by clang::CodeGen::swiftcall::SwiftAggLowering::shouldPassIndirectly(), and clang::CodeGen::swiftcall::shouldPassIndirectly().
|
protected |
Definition at line 132 of file ABIInfo.h.
Referenced by occupiesMoreThan().
|
protected |
Definition at line 133 of file ABIInfo.h.
Referenced by isSwiftErrorInRegister().