14 #ifndef LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H 15 #define LLVM_CLANG_CODEGEN_SWIFTCALLINGCONV_H 20 #include "llvm/Support/TrailingObjects.h" 33 class ASTRecordLayout;
55 bool Finished =
false;
61 addEntry(
nullptr, begin, end);
68 void addTypedData(llvm::Type *type,
CharUnits begin);
75 assert(Finished &&
"didn't finish lowering before calling empty()");
76 return Entries.empty();
93 llvm::function_ref<void(CharUnits offset, CharUnits end, llvm::Type *type)>;
109 std::pair<llvm::StructType*, llvm::Type*> getCoerceAndExpandTypes()
const;
116 void splitVectorEntry(
unsigned index);
117 static bool shouldMergeEntries(
const StorageEntry &first,
118 const StorageEntry &second,
141 llvm::VectorType *vectorTy);
143 llvm::Type *eltTy,
unsigned numElts);
146 std::pair<llvm::Type*, unsigned>
148 llvm::VectorType *vectorTy);
155 llvm::VectorType *vectorTy,
A (possibly-)qualified type.
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
bool isLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::Type *eltTy, unsigned numElts)
C Language Family Type Representation.
The base class of the type hierarchy.
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
std::pair< llvm::Type *, unsigned > splitLegalVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy)
Minimally split a legal vector type.
Represents a struct/union/class.
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
Represents a member of a struct/union/class.
CharUnits - This is an opaque type for sizes expressed in character units.
llvm::function_ref< void(CharUnits offset, CharUnits end, llvm::Type *type)> EnumerationCallback
ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...
CharUnits getNaturalAlignment(CodeGenModule &CGM, llvm::Type *type)
Return the Swift CC's notion of the natural alignment of a type.
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...
void addOpaqueData(CharUnits begin, CharUnits end)
bool isSwiftErrorLoweredInRegister(CodeGenModule &CGM)
Is swifterror lowered to a register by the target ABI?
static bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)
bool shouldPassIndirectly(CodeGenModule &CGM, ArrayRef< llvm::Type *> types, bool asReturnValue)
Should an aggregate which expands to the given type sequence be passed/returned indirectly under swif...
bool empty() const
Does this lowering require passing any data?
void computeABIInfo(CodeGenModule &CGM, CGFunctionInfo &FI)
Compute the ABI information of a swiftcall function.
SwiftAggLowering(CodeGenModule &CGM)
void legalizeVectorType(CodeGenModule &CGM, CharUnits vectorSize, llvm::VectorType *vectorTy, llvm::SmallVectorImpl< llvm::Type *> &types)
Turn a vector type in a sequence of legal component vector types.
CGFunctionInfo - Class to encapsulate the information about a function definition.
This class organizes the cross-function state that is used while generating LLVM code.
Optional< types::ID > Type
Dataflow Directional Tag Classes.
bool mustPassRecordIndirectly(CodeGenModule &CGM, const RecordDecl *record)
Is the given record type required to be passed and returned indirectly because of language restrictio...
bool isLegalIntegerType(CodeGenModule &CGM, llvm::IntegerType *type)
Is the given integer type "legal" for Swift's perspective on the current platform?
CharUnits getMaximumVoluntaryIntegerSize(CodeGenModule &CGM)
Return the maximum voluntary integer size for the current target.