clang 24.0.0git
Hexagon.cpp
Go to the documentation of this file.
1//===- Hexagon.cpp --------------------------------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "ABIInfoImpl.h"
10#include "TargetInfo.h"
11#include "llvm/ADT/StringExtras.h"
12
13using namespace clang;
14using namespace clang::CodeGen;
15
16//===----------------------------------------------------------------------===//
17// Hexagon ABI Implementation
18//===----------------------------------------------------------------------===//
19
20namespace {
21
22class HexagonABIInfo : public DefaultABIInfo {
23public:
24 HexagonABIInfo(CodeGenTypes &CGT) : DefaultABIInfo(CGT) {}
25
26private:
27 ABIArgInfo classifyReturnType(QualType RetTy) const;
28 ABIArgInfo classifyArgumentType(QualType RetTy, unsigned *RegsLeft) const;
29
30 void computeInfo(CGFunctionInfo &FI) const override;
31
32 RValue EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty,
33 AggValueSlot Slot) const override;
34 Address EmitVAArgFromMemory(CodeGenFunction &CFG, Address VAListAddr,
35 QualType Ty) const;
36 Address EmitVAArgForHexagon(CodeGenFunction &CFG, Address VAListAddr,
37 QualType Ty) const;
38 Address EmitVAArgForHexagonLinux(CodeGenFunction &CFG, Address VAListAddr,
39 QualType Ty) const;
40};
41
42class HexagonTargetCodeGenInfo : public TargetCodeGenInfo {
43public:
44 HexagonTargetCodeGenInfo(CodeGenTypes &CGT)
45 : TargetCodeGenInfo(std::make_unique<HexagonABIInfo>(CGT)) {}
46
47 int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
48 return 29;
49 }
50
51 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
52 CodeGen::CodeGenModule &GCM) const override {
53 auto *Fn = dyn_cast<llvm::Function>(GV);
54 if (!Fn)
55 return;
56 // Declarations are not skipped: functions without a FunctionDecl, such as
57 // global initializers, get here before their body is emitted.
58 const auto *FD = dyn_cast_or_null<FunctionDecl>(D);
59 unsigned Limit = GCM.getCodeGenOpts().HLXVectorStackLimit;
60 if (const auto *Attr =
61 FD ? FD->getAttr<HexagonHLXVectorStackLimitAttr>() : nullptr)
62 Fn->addFnAttr("hlx-vector-stack-limit", llvm::utostr(Attr->getLimit()));
63 else if (Limit != UINT_MAX)
64 Fn->addFnAttr("hlx-vector-stack-limit", llvm::utostr(Limit));
65 }
66};
67
68} // namespace
69
70void HexagonABIInfo::computeInfo(CGFunctionInfo &FI) const {
71 unsigned RegsLeft = 6;
72 if (!getCXXABI().classifyReturnType(FI))
74 for (auto &I : FI.arguments())
75 I.info = classifyArgumentType(I.type, &RegsLeft);
76}
77
78static bool HexagonAdjustRegsLeft(uint64_t Size, unsigned *RegsLeft) {
79 assert(Size <= 64 && "Not expecting to pass arguments larger than 64 bits"
80 " through registers");
81
82 if (*RegsLeft == 0)
83 return false;
84
85 if (Size <= 32) {
86 (*RegsLeft)--;
87 return true;
88 }
89
90 if (2 <= (*RegsLeft & (~1U))) {
91 *RegsLeft = (*RegsLeft & (~1U)) - 2;
92 return true;
93 }
94
95 // Next available register was r5 but candidate was greater than 32-bits so it
96 // has to go on the stack. However we still consume r5
97 if (*RegsLeft == 1)
98 *RegsLeft = 0;
99
100 return false;
101}
102
103ABIArgInfo HexagonABIInfo::classifyArgumentType(QualType Ty,
104 unsigned *RegsLeft) const {
105 if (!isAggregateTypeForABI(Ty)) {
106 // Treat an enum type as its underlying type.
107 if (const auto *ED = Ty->getAsEnumDecl())
108 Ty = ED->getIntegerType();
109
110 uint64_t Size = getContext().getTypeSize(Ty);
111 if (Size <= 64)
112 HexagonAdjustRegsLeft(Size, RegsLeft);
113
114 if (Size > 64 && Ty->isBitIntType())
115 return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
116 /*ByVal=*/true);
117
118 return isPromotableIntegerTypeForABI(Ty) ? ABIArgInfo::getExtend(Ty)
119 : ABIArgInfo::getDirect();
120 }
121
122 if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI()))
123 return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
125
126 // Ignore empty records.
127 if (isEmptyRecord(getContext(), Ty, true))
128 return ABIArgInfo::getIgnore();
129
130 uint64_t Size = getContext().getTypeSize(Ty);
131 unsigned Align = getContext().getTypeAlign(Ty);
132
133 if (Size > 64)
134 return getNaturalAlignIndirect(Ty, getDataLayout().getAllocaAddrSpace(),
135 /*ByVal=*/true);
136
137 if (HexagonAdjustRegsLeft(Size, RegsLeft))
138 Align = Size <= 32 ? 32 : 64;
139 if (Size <= Align) {
140 // Pass in the smallest viable integer type.
141 Size = llvm::bit_ceil(Size);
142 return ABIArgInfo::getDirect(llvm::Type::getIntNTy(getVMContext(), Size));
143 }
145}
146
147ABIArgInfo HexagonABIInfo::classifyReturnType(QualType RetTy) const {
148 if (RetTy->isVoidType())
149 return ABIArgInfo::getIgnore();
150
151 const TargetInfo &T = CGT.getTarget();
152 uint64_t Size = getContext().getTypeSize(RetTy);
153
154 if (RetTy->getAs<VectorType>()) {
155 // HVX vectors are returned in vector registers or register pairs.
156 if (T.hasFeature("hvx")) {
157 assert(T.hasFeature("hvx-length64b") || T.hasFeature("hvx-length128b"));
158 uint64_t VecSize = T.hasFeature("hvx-length64b") ? 64*8 : 128*8;
159 if (Size == VecSize || Size == 2*VecSize)
161 }
162 // HLX vectors are returned in HLX registers or register pairs.
163 if (T.hasFeature("hlx")) {
164 uint64_t VecSize = 2048 * 8;
165 if (Size == VecSize || Size == 2 * VecSize)
167 }
168 // Large vector types should be returned via memory.
169 if (Size > 64)
170 return getNaturalAlignIndirect(RetTy,
171 getDataLayout().getAllocaAddrSpace());
172 }
173
174 if (!isAggregateTypeForABI(RetTy)) {
175 // Treat an enum type as its underlying type.
176 if (const auto *ED = RetTy->getAsEnumDecl())
177 RetTy = ED->getIntegerType();
178
179 if (Size > 64 && RetTy->isBitIntType())
180 return getNaturalAlignIndirect(
181 RetTy, getDataLayout().getAllocaAddrSpace(), /*ByVal=*/false);
182
183 return isPromotableIntegerTypeForABI(RetTy) ? ABIArgInfo::getExtend(RetTy)
184 : ABIArgInfo::getDirect();
185 }
186
187 if (isEmptyRecord(getContext(), RetTy, true))
188 return ABIArgInfo::getIgnore();
189
190 // Aggregates <= 8 bytes are returned in registers, other aggregates
191 // are returned indirectly.
192 if (Size <= 64) {
193 // Return in the smallest viable integer type.
194 Size = llvm::bit_ceil(Size);
195 return ABIArgInfo::getDirect(llvm::Type::getIntNTy(getVMContext(), Size));
196 }
197 return getNaturalAlignIndirect(RetTy, getDataLayout().getAllocaAddrSpace(),
198 /*ByVal=*/true);
199}
200
201Address HexagonABIInfo::EmitVAArgFromMemory(CodeGenFunction &CGF,
202 Address VAListAddr,
203 QualType Ty) const {
204 // Load the overflow area pointer.
205 Address __overflow_area_pointer_p =
206 CGF.Builder.CreateStructGEP(VAListAddr, 2, "__overflow_area_pointer_p");
207 llvm::Value *__overflow_area_pointer = CGF.Builder.CreateLoad(
208 __overflow_area_pointer_p, "__overflow_area_pointer");
209
210 uint64_t Align = CGF.getContext().getTypeAlign(Ty) / 8;
211 if (Align > 4) {
212 // Alignment should be a power of 2.
213 assert((Align & (Align - 1)) == 0 && "Alignment is not power of 2!");
214
215 // overflow_arg_area = (overflow_arg_area + align - 1) & -align;
216 llvm::Value *Offset = llvm::ConstantInt::get(CGF.Int64Ty, Align - 1);
217
218 // Add offset to the current pointer to access the argument.
219 __overflow_area_pointer =
220 CGF.Builder.CreateGEP(CGF.Int8Ty, __overflow_area_pointer, Offset);
221 llvm::Value *AsInt =
222 CGF.Builder.CreatePtrToInt(__overflow_area_pointer, CGF.Int32Ty);
223
224 // Create a mask which should be "AND"ed
225 // with (overflow_arg_area + align - 1)
226 llvm::Value *Mask = llvm::ConstantInt::getSigned(CGF.Int32Ty, -(int)Align);
227 __overflow_area_pointer = CGF.Builder.CreateIntToPtr(
228 CGF.Builder.CreateAnd(AsInt, Mask), __overflow_area_pointer->getType(),
229 "__overflow_area_pointer.align");
230 }
231
232 // Get the type of the argument from memory and bitcast
233 // overflow area pointer to the argument type.
234 llvm::Type *PTy = CGF.ConvertTypeForMem(Ty);
235 Address AddrTyped =
236 Address(__overflow_area_pointer, PTy, CharUnits::fromQuantity(Align));
237
238 // Round up to the minimum stack alignment for varargs which is 4 bytes.
239 uint64_t Offset = llvm::alignTo(CGF.getContext().getTypeSize(Ty) / 8, 4);
240
241 __overflow_area_pointer = CGF.Builder.CreateGEP(
242 CGF.Int8Ty, __overflow_area_pointer,
243 llvm::ConstantInt::get(CGF.Int32Ty, Offset),
244 "__overflow_area_pointer.next");
245 CGF.Builder.CreateStore(__overflow_area_pointer, __overflow_area_pointer_p);
246
247 return AddrTyped;
248}
249
250Address HexagonABIInfo::EmitVAArgForHexagon(CodeGenFunction &CGF,
251 Address VAListAddr,
252 QualType Ty) const {
253 // FIXME: Need to handle alignment
254 llvm::Type *BP = CGF.Int8PtrTy;
255 CGBuilderTy &Builder = CGF.Builder;
256 Address VAListAddrAsBPP = VAListAddr.withElementType(BP);
257 llvm::Value *Addr = Builder.CreateLoad(VAListAddrAsBPP, "ap.cur");
258 // Handle address alignment for type alignment > 32 bits
259 uint64_t TyAlign = CGF.getContext().getTypeAlign(Ty) / 8;
260 if (TyAlign > 4) {
261 assert((TyAlign & (TyAlign - 1)) == 0 && "Alignment is not power of 2!");
262 llvm::Value *AddrAsInt = Builder.CreatePtrToInt(Addr, CGF.Int32Ty);
263 AddrAsInt = Builder.CreateAdd(AddrAsInt, Builder.getInt32(TyAlign - 1));
264 AddrAsInt = Builder.CreateAnd(AddrAsInt, Builder.getInt32(~(TyAlign - 1)));
265 Addr = Builder.CreateIntToPtr(AddrAsInt, BP);
266 }
267 Address AddrTyped =
269
270 uint64_t Offset = llvm::alignTo(CGF.getContext().getTypeSize(Ty) / 8, 4);
271 llvm::Value *NextAddr = Builder.CreateGEP(
272 CGF.Int8Ty, Addr, llvm::ConstantInt::get(CGF.Int32Ty, Offset), "ap.next");
273 Builder.CreateStore(NextAddr, VAListAddrAsBPP);
274
275 return AddrTyped;
276}
277
278Address HexagonABIInfo::EmitVAArgForHexagonLinux(CodeGenFunction &CGF,
279 Address VAListAddr,
280 QualType Ty) const {
281 int ArgSize = CGF.getContext().getTypeSize(Ty) / 8;
282
283 if (ArgSize > 8)
284 return EmitVAArgFromMemory(CGF, VAListAddr, Ty);
285
286 // Here we have check if the argument is in register area or
287 // in overflow area.
288 // If the saved register area pointer + argsize rounded up to alignment >
289 // saved register area end pointer, argument is in overflow area.
290 unsigned RegsLeft = 6;
291 Ty = CGF.getContext().getCanonicalType(Ty);
292 (void)classifyArgumentType(Ty, &RegsLeft);
293
294 llvm::BasicBlock *MaybeRegBlock = CGF.createBasicBlock("vaarg.maybe_reg");
295 llvm::BasicBlock *InRegBlock = CGF.createBasicBlock("vaarg.in_reg");
296 llvm::BasicBlock *OnStackBlock = CGF.createBasicBlock("vaarg.on_stack");
297 llvm::BasicBlock *ContBlock = CGF.createBasicBlock("vaarg.end");
298
299 // Get rounded size of the argument.GCC does not allow vararg of
300 // size < 4 bytes. We follow the same logic here.
301 ArgSize = (CGF.getContext().getTypeSize(Ty) <= 32) ? 4 : 8;
302 int ArgAlign = (CGF.getContext().getTypeSize(Ty) <= 32) ? 4 : 8;
303
304 // Argument may be in saved register area
305 CGF.EmitBlock(MaybeRegBlock);
306
307 // Load the current saved register area pointer.
308 Address __current_saved_reg_area_pointer_p = CGF.Builder.CreateStructGEP(
309 VAListAddr, 0, "__current_saved_reg_area_pointer_p");
310 llvm::Value *__current_saved_reg_area_pointer = CGF.Builder.CreateLoad(
311 __current_saved_reg_area_pointer_p, "__current_saved_reg_area_pointer");
312
313 // Load the saved register area end pointer.
314 Address __saved_reg_area_end_pointer_p = CGF.Builder.CreateStructGEP(
315 VAListAddr, 1, "__saved_reg_area_end_pointer_p");
316 llvm::Value *__saved_reg_area_end_pointer = CGF.Builder.CreateLoad(
317 __saved_reg_area_end_pointer_p, "__saved_reg_area_end_pointer");
318
319 // If the size of argument is > 4 bytes, check if the stack
320 // location is aligned to 8 bytes
321 if (ArgAlign > 4) {
322
323 llvm::Value *__current_saved_reg_area_pointer_int =
324 CGF.Builder.CreatePtrToInt(__current_saved_reg_area_pointer,
325 CGF.Int32Ty);
326
327 __current_saved_reg_area_pointer_int = CGF.Builder.CreateAdd(
328 __current_saved_reg_area_pointer_int,
329 llvm::ConstantInt::get(CGF.Int32Ty, (ArgAlign - 1)),
330 "align_current_saved_reg_area_pointer");
331
332 __current_saved_reg_area_pointer_int = CGF.Builder.CreateAnd(
333 __current_saved_reg_area_pointer_int,
334 llvm::ConstantInt::getSigned(CGF.Int32Ty, -ArgAlign),
335 "align_current_saved_reg_area_pointer");
336
337 __current_saved_reg_area_pointer =
338 CGF.Builder.CreateIntToPtr(__current_saved_reg_area_pointer_int,
339 __current_saved_reg_area_pointer->getType(),
340 "align_current_saved_reg_area_pointer");
341 }
342
343 llvm::Value *__new_saved_reg_area_pointer =
344 CGF.Builder.CreateGEP(CGF.Int8Ty, __current_saved_reg_area_pointer,
345 llvm::ConstantInt::get(CGF.Int32Ty, ArgSize),
346 "__new_saved_reg_area_pointer");
347
348 llvm::Value *UsingStack = nullptr;
349 UsingStack = CGF.Builder.CreateICmpSGT(__new_saved_reg_area_pointer,
350 __saved_reg_area_end_pointer);
351
352 CGF.Builder.CreateCondBr(UsingStack, OnStackBlock, InRegBlock);
353
354 // Argument in saved register area
355 // Implement the block where argument is in register saved area
356 CGF.EmitBlock(InRegBlock);
357
358 CGF.Builder.CreateStore(__new_saved_reg_area_pointer,
359 __current_saved_reg_area_pointer_p);
360
361 CGF.EmitBranch(ContBlock);
362
363 // Argument in overflow area
364 // Implement the block where the argument is in overflow area.
365 CGF.EmitBlock(OnStackBlock);
366
367 // Load the overflow area pointer
368 Address __overflow_area_pointer_p =
369 CGF.Builder.CreateStructGEP(VAListAddr, 2, "__overflow_area_pointer_p");
370 llvm::Value *__overflow_area_pointer = CGF.Builder.CreateLoad(
371 __overflow_area_pointer_p, "__overflow_area_pointer");
372
373 // Align the overflow area pointer according to the alignment of the argument
374 if (ArgAlign > 4) {
375 llvm::Value *__overflow_area_pointer_int =
376 CGF.Builder.CreatePtrToInt(__overflow_area_pointer, CGF.Int32Ty);
377
378 __overflow_area_pointer_int =
379 CGF.Builder.CreateAdd(__overflow_area_pointer_int,
380 llvm::ConstantInt::get(CGF.Int32Ty, ArgAlign - 1),
381 "align_overflow_area_pointer");
382
383 __overflow_area_pointer_int = CGF.Builder.CreateAnd(
384 __overflow_area_pointer_int,
385 llvm::ConstantInt::getSigned(CGF.Int32Ty, -ArgAlign),
386 "align_overflow_area_pointer");
387
388 __overflow_area_pointer = CGF.Builder.CreateIntToPtr(
389 __overflow_area_pointer_int, __overflow_area_pointer->getType(),
390 "align_overflow_area_pointer");
391 }
392
393 // Get the pointer for next argument in overflow area and store it
394 // to overflow area pointer.
395 llvm::Value *__new_overflow_area_pointer = CGF.Builder.CreateGEP(
396 CGF.Int8Ty, __overflow_area_pointer,
397 llvm::ConstantInt::get(CGF.Int32Ty, ArgSize),
398 "__overflow_area_pointer.next");
399
400 CGF.Builder.CreateStore(__new_overflow_area_pointer,
401 __overflow_area_pointer_p);
402
403 CGF.Builder.CreateStore(__new_overflow_area_pointer,
404 __current_saved_reg_area_pointer_p);
405
406 CGF.EmitBranch(ContBlock);
407 // Get the correct pointer to load the variable argument
408 // Implement the ContBlock
409 CGF.EmitBlock(ContBlock);
410
411 llvm::Type *MemTy = CGF.ConvertTypeForMem(Ty);
412 llvm::PHINode *ArgAddr = CGF.Builder.CreatePHI(
413 llvm::PointerType::getUnqual(MemTy->getContext()), 2, "vaarg.addr");
414 ArgAddr->addIncoming(__current_saved_reg_area_pointer, InRegBlock);
415 ArgAddr->addIncoming(__overflow_area_pointer, OnStackBlock);
416
417 return Address(ArgAddr, MemTy, CharUnits::fromQuantity(ArgAlign));
418}
419
420RValue HexagonABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
421 QualType Ty, AggValueSlot Slot) const {
422
423 if (getTarget().getTriple().isMusl())
424 return CGF.EmitLoadOfAnyValue(
425 CGF.MakeAddrLValue(EmitVAArgForHexagonLinux(CGF, VAListAddr, Ty), Ty),
426 Slot);
427
428 return CGF.EmitLoadOfAnyValue(
429 CGF.MakeAddrLValue(EmitVAArgForHexagon(CGF, VAListAddr, Ty), Ty), Slot);
430}
431
432std::unique_ptr<TargetCodeGenInfo>
434 return std::make_unique<HexagonTargetCodeGenInfo>(CGM.getTypes());
435}
static bool HexagonAdjustRegsLeft(uint64_t Size, unsigned *RegsLeft)
Definition Hexagon.cpp:78
static StringRef getTriple(const Command &Job)
static CanQualType getCanonicalType(QualType T)
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
unsigned getTypeAlign(QualType T) const
Return the ABI-specified alignment of a (complete) type T, in bits.
static CharUnits fromQuantity(QuantityType Quantity)
Construct a CharUnits quantity from a raw integer type.
Definition CharUnits.h:58
static ABIArgInfo getIgnore()
static ABIArgInfo getDirect(llvm::Type *T=nullptr, unsigned Offset=0, llvm::Type *Padding=nullptr, bool CanBeFlattened=true, unsigned Align=0)
static ABIArgInfo getExtend(QualType Ty, llvm::Type *T=nullptr, llvm::Type *Padding=nullptr)
static ABIArgInfo getDirectInReg(llvm::Type *T=nullptr)
Address withElementType(llvm::Type *ElemTy) const
Return address with different element type, but same pointer and alignment.
Definition Address.h:276
llvm::StoreInst * CreateStore(llvm::Value *Val, Address Addr, bool IsVolatile=false)
Definition CGBuilder.h:156
Address CreateGEP(CodeGenFunction &CGF, Address Addr, llvm::Value *Index, const llvm::Twine &Name="")
Definition CGBuilder.h:312
Address CreateStructGEP(Address Addr, unsigned Index, const llvm::Twine &Name="")
Definition CGBuilder.h:239
llvm::LoadInst * CreateLoad(Address Addr, const llvm::Twine &Name="")
Definition CGBuilder.h:128
RecordArgABI
Specify how one should pass an argument of a record type.
Definition CGCXXABI.h:150
@ RAA_DirectInMemory
Pass it on the stack using its defined layout.
Definition CGCXXABI.h:158
CGFunctionInfo - Class to encapsulate the information about a function definition.
CanQualType getReturnType() const
MutableArrayRef< ArgInfo > arguments()
llvm::Type * ConvertType(QualType T)
llvm::BasicBlock * createBasicBlock(const Twine &name="", llvm::Function *parent=nullptr, llvm::BasicBlock *before=nullptr)
createBasicBlock - Create an LLVM basic block.
RValue EmitLoadOfAnyValue(LValue V, AggValueSlot Slot=AggValueSlot::ignored(), SourceLocation Loc={})
Like EmitLoadOfLValue but also handles complex and aggregate types.
Definition CGExpr.cpp:2531
llvm::Type * ConvertTypeForMem(QualType T)
void EmitBranch(llvm::BasicBlock *Block)
EmitBranch - Emit a branch to the specified basic block from the current insert block,...
Definition CGStmt.cpp:678
LValue MakeAddrLValue(Address Addr, QualType T, AlignmentSource Source=AlignmentSource::Type)
void EmitBlock(llvm::BasicBlock *BB, bool IsFinished=false)
EmitBlock - Emit the given block.
Definition CGStmt.cpp:658
This class organizes the cross-function state that is used while generating LLVM code.
const CodeGenOptions & getCodeGenOpts() const
DefaultABIInfo - The default implementation for ABI specific details.
Definition ABIInfoImpl.h:21
ABIArgInfo classifyArgumentType(QualType RetTy) const
TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...
Definition TargetInfo.h:80
bool isVoidType() const
Definition TypeBase.h:9200
bool isBitIntType() const
Definition TypeBase.h:9090
EnumDecl * getAsEnumDecl() const
Retrieves the EnumDecl this type refers to.
Definition Type.h:53
const T * getAs() const
Member-template getAs<specific type>'.
Definition TypeBase.h:9431
#define UINT_MAX
Definition limits.h:64
ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)
Classify the rules for how to pass a particular type.
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
Definition CGValue.h:146
CGCXXABI::RecordArgABI getRecordArgABI(const RecordType *RT, CGCXXABI &CXXABI)
bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)
std::unique_ptr< TargetCodeGenInfo > createHexagonTargetCodeGenInfo(CodeGenModule &CGM)
Definition Hexagon.cpp:433
bool isAggregateTypeForABI(QualType T)
bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays, bool AsIfNoUniqueAddr=false)
isEmptyRecord - Return true iff a structure contains only empty fields.
@ Address
A pointer to a ValueDecl.
Definition Primitives.h:28
Top level wrappers for InstallAPI frontend operations.
const FunctionProtoType * T
__builtin_elementwise_add_sat __builtin_elementwise_sub_sat uint32_t uint64_t __builtin_riscv_ssha_i32 __builtin_riscv_sshl_u32 uint64_t
llvm::IntegerType * Int8Ty
i8, i16, i32, and i64