clang: lib/CodeGen/Targets/ARM.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

10#include "TargetInfo.h"

11

12using namespace clang;

14

15

16

17

18

19namespace {

20

21class ARMABIInfo : public ABIInfo {

23 bool IsFloatABISoftFP;

24

25public:

27 setCCs();

30 }

31

32 bool isEABI() const {

33 switch (getTarget().getTriple().getEnvironment()) {

34 case llvm::Triple::Android:

35 case llvm::Triple::EABI:

36 case llvm::Triple::EABIHF:

37 case llvm::Triple::GNUEABI:

38 case llvm::Triple::GNUEABIT64:

39 case llvm::Triple::GNUEABIHF:

40 case llvm::Triple::GNUEABIHFT64:

41 case llvm::Triple::MuslEABI:

42 case llvm::Triple::MuslEABIHF:

43 return true;

44 default:

46 }

47 }

48

49 bool isEABIHF() const {

50 switch (getTarget().getTriple().getEnvironment()) {

51 case llvm::Triple::EABIHF:

52 case llvm::Triple::GNUEABIHF:

53 case llvm::Triple::GNUEABIHFT64:

54 case llvm::Triple::MuslEABIHF:

55 return true;

56 default:

57 return false;

58 }

59 }

60

62

65 }

66

67private:

69 unsigned functionCallConv) const;

71 unsigned functionCallConv) const;

73 uint64_t Members) const;

75 bool isIllegalVectorType(QualType Ty) const;

76 bool containsAnyFP16Vectors(QualType Ty) const;

77

80 uint64_t Members) const override;

82

83 bool isEffectivelyAAPCS_VFP(unsigned callConvention, bool acceptHalf) const;

84

86

89

90 llvm::CallingConv::ID getLLVMDefaultCC() const;

91 llvm::CallingConv::ID getABIDefaultCC() const;

92 void setCCs();

93};

94

96public:

99

101 unsigned NumElts) const override;

102};

103

105public:

108 SwiftInfo = std::make_unique(CGT);

109 }

110

112 return 13;

113 }

114

116 return "mov\tr7, r7\t\t// marker for objc_retainAutoreleaseReturnValue";

117 }

118

120 llvm::Value *Address) const override {

121 llvm::Value *Four8 = llvm::ConstantInt::get(CGF.Int8Ty, 4);

122

123

125 return false;

126 }

127

129 if (getABIInfo().isEABI())

130 return 88;

132 }

133

136 if (GV->isDeclaration())

137 return;

138 const FunctionDecl *FD = dyn_cast_or_null(D);

139 if (!FD)

140 return;

141 auto *Fn = castllvm::Function(GV);

142

143 if (const auto *TA = FD->getAttr()) {

146 if (Attr.BranchProtection.empty()) {

148 StringRef DiagMsg;

149 StringRef Arch =

152 Arch, BPI, DiagMsg)) {

155 diag::warn_target_unsupported_branch_protection_attribute)

156 << Arch;

157 } else

159 } else if (CGM.getLangOpts().BranchTargetEnforcement ||

161

162

163

167 diag::warn_target_unsupported_branch_protection_attribute)

169 }

174 }

175

176 const ARMInterruptAttr *Attr = FD->getAttr();

178 return;

179

180 const char *Kind;

181 switch (Attr->getInterrupt()) {

182 case ARMInterruptAttr::Generic: Kind = ""; break;

183 case ARMInterruptAttr::IRQ: Kind = "IRQ"; break;

184 case ARMInterruptAttr::FIQ: Kind = "FIQ"; break;

185 case ARMInterruptAttr::SWI: Kind = "SWI"; break;

186 case ARMInterruptAttr::ABORT: Kind = "ABORT"; break;

187 case ARMInterruptAttr::UNDEF: Kind = "UNDEF"; break;

188 }

189

190 Fn->addFnAttr("interrupt", Kind);

191

192 ARMABIKind ABI = getABIInfo().getABIKind();

193 if (ABI == ARMABIKind::APCS)

194 return;

195

196

197

198

199 llvm::AttrBuilder B(Fn->getContext());

200 B.addStackAlignmentAttr(8);

201 Fn->addFnAttrs(B);

202 }

203};

204

205class WindowsARMTargetCodeGenInfo : public ARMTargetCodeGenInfo {

206public:

208 : ARMTargetCodeGenInfo(CGT, K) {}

209

210 void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,

212

213 void getDependentLibraryOption(llvm::StringRef Lib,

215 Opt = "/DEFAULTLIB:" + qualifyWindowsLibrary(Lib);

216 }

217

218 void getDetectMismatchOption(llvm::StringRef Name, llvm::StringRef Value,

220 Opt = "/FAILIFMISMATCH:\"" + Name.str() + "=" + Value.str() + "\"";

221 }

222};

223

224void WindowsARMTargetCodeGenInfo::setTargetAttributes(

226 ARMTargetCodeGenInfo::setTargetAttributes(D, GV, CGM);

227 if (GV->isDeclaration())

228 return;

229 addStackProbeTargetAttributes(D, GV, CGM);

230}

231}

232

233void ARMABIInfo::computeInfo(CGFunctionInfo &FI) const {

237

241

242

243

245 return;

246

247 llvm::CallingConv::ID cc = getRuntimeCC();

248 if (cc != llvm::CallingConv::C)

250}

251

252

253llvm::CallingConv::ID ARMABIInfo::getLLVMDefaultCC() const {

254

255 if (isEABIHF() || getTarget().getTriple().isWatchABI())

256 return llvm::CallingConv::ARM_AAPCS_VFP;

257 else if (isEABI())

258 return llvm::CallingConv::ARM_AAPCS;

259 else

260 return llvm::CallingConv::ARM_APCS;

261}

262

263

264

265llvm::CallingConv::ID ARMABIInfo::getABIDefaultCC() const {

266 switch (getABIKind()) {

267 case ARMABIKind::APCS:

268 return llvm::CallingConv::ARM_APCS;

269 case ARMABIKind::AAPCS:

270 return llvm::CallingConv::ARM_AAPCS;

271 case ARMABIKind::AAPCS_VFP:

272 return llvm::CallingConv::ARM_AAPCS_VFP;

273 case ARMABIKind::AAPCS16_VFP:

274 return llvm::CallingConv::ARM_AAPCS_VFP;

275 }

276 llvm_unreachable("bad ABI kind");

277}

278

279void ARMABIInfo::setCCs() {

280 assert(getRuntimeCC() == llvm::CallingConv::C);

281

282

283

284 llvm::CallingConv::ID abiCC = getABIDefaultCC();

285 if (abiCC != getLLVMDefaultCC())

286 RuntimeCC = abiCC;

287}

288

290 uint64_t Size = getContext().getTypeSize(Ty);

291 if (Size <= 32) {

292 llvm::Type *ResType =

293 llvm::Type::getInt32Ty(getVMContext());

295 }

296 if (Size == 64 || Size == 128) {

297 auto *ResType = llvm::FixedVectorType::get(

298 llvm::Type::getInt32Ty(getVMContext()), Size / 32);

300 }

301 return getNaturalAlignIndirect(Ty, false);

302}

303

306 uint64_t Members) const {

307 assert(Base && "Base class should be set for homogeneous aggregate");

308

310

311 if (!getTarget().hasLegalHalfType() && containsAnyFP16Vectors(Ty)) {

312 uint64_t Size = getContext().getTypeSize(VT);

313 auto *NewVecTy = llvm::FixedVectorType::get(

314 llvm::Type::getInt32Ty(getVMContext()), Size / 32);

315 llvm::Type *Ty = llvm::ArrayType::get(NewVecTy, Members);

317 }

318 }

319 unsigned Align = 0;

320 if (getABIKind() == ARMABIKind::AAPCS ||

321 getABIKind() == ARMABIKind::AAPCS_VFP) {

322

323

324 Align = getContext().getTypeUnadjustedAlignInChars(Ty).getQuantity();

325 unsigned BaseAlign = getContext().getTypeAlignInChars(Base).getQuantity();

326 Align = (Align > BaseAlign && Align >= 8) ? 8 : 0;

327 }

329}

330

331ABIArgInfo ARMABIInfo::classifyArgumentType(QualType Ty, bool isVariadic,

332 unsigned functionCallConv) const {

333

334

335

336

337

338

339

340

341 bool IsAAPCS_VFP =

342 !isVariadic && isEffectivelyAAPCS_VFP(functionCallConv, false);

343

345

346

347 if (isIllegalVectorType(Ty))

348 return coerceIllegalVector(Ty);

349

351

353 Ty = EnumTy->getDecl()->getIntegerType();

354 }

355

357 if (EIT->getNumBits() > 64)

358 return getNaturalAlignIndirect(Ty, true);

359

360 return (isPromotableIntegerTypeForABI(Ty)

363 }

364

367 }

368

369

372

373 if (IsAAPCS_VFP) {

374

375

378 if (isHomogeneousAggregate(Ty, Base, Members))

379 return classifyHomogeneousAggregate(Ty, Base, Members);

380 } else if (getABIKind() == ARMABIKind::AAPCS16_VFP) {

381

382

383

386 if (isHomogeneousAggregate(Ty, Base, Members)) {

387 assert(Base && Members <= 4 && "unexpected homogeneous aggregate");

388 llvm::Type *Ty =

391 }

392 }

393

394 if (getABIKind() == ARMABIKind::AAPCS16_VFP &&

396

397

398

401 }

402

403

404

405

406

409 if (getABIKind() == ARMABIKind::AAPCS_VFP ||

410 getABIKind() == ARMABIKind::AAPCS) {

411 TyAlign = getContext().getTypeUnadjustedAlignInChars(Ty).getQuantity();

412 ABIAlign = std::clamp(TyAlign, (uint64_t)4, (uint64_t)8);

413 } else {

414 TyAlign = getContext().getTypeAlignInChars(Ty).getQuantity();

415 }

417 assert(getABIKind() != ARMABIKind::AAPCS16_VFP && "unexpected byval");

419 true,

420 TyAlign > ABIAlign);

421 }

422

423

424 llvm::Type* ElemTy;

425 unsigned SizeRegs;

426

427

428 if (TyAlign <= 4) {

429 ElemTy = llvm::Type::getInt32Ty(getVMContext());

430 SizeRegs = (getContext().getTypeSize(Ty) + 31) / 32;

431 } else {

432 ElemTy = llvm::Type::getInt64Ty(getVMContext());

433 SizeRegs = (getContext().getTypeSize(Ty) + 63) / 64;

434 }

435

437}

438

440 llvm::LLVMContext &VMContext) {

441

442

443

444

446

447

448 if (Size > 32)

449 return false;

450

451

453 return false;

454

455

457 return false;

458

459

461 return true;

462

463

465 return isIntegerLikeType(CT->getElementType(), Context, VMContext);

466

467

468

469

470

472 if (!RT) return false;

473

474

477 return false;

478

479

480

482

483 bool HadField = false;

484 unsigned idx = 0;

486 i != e; ++i, ++idx) {

488

489

490

491

492

495 HadField = true;

496

498 return false;

499

500 continue;

501 }

502

503

505 return false;

506

508 return false;

509

510

511

512

514 if (HadField)

515 return false;

516

517 HadField = true;

518 }

519 }

520

521 return true;

522}

523

524ABIArgInfo ARMABIInfo::classifyReturnType(QualType RetTy, bool isVariadic,

525 unsigned functionCallConv) const {

526

527

528 bool IsAAPCS_VFP =

529 !isVariadic && isEffectivelyAAPCS_VFP(functionCallConv, true);

530

533

535

536 if (getContext().getTypeSize(RetTy) > 128)

537 return getNaturalAlignIndirect(RetTy);

538

539

540 if ((!getTarget().hasLegalHalfType() &&

541 (VT->getElementType()->isFloat16Type() ||

542 VT->getElementType()->isHalfType())) ||

543 (IsFloatABISoftFP &&

544 VT->getElementType()->isBFloat16Type()))

545 return coerceIllegalVector(RetTy);

546 }

547

549

551 RetTy = EnumTy->getDecl()->getIntegerType();

552

554 if (EIT->getNumBits() > 64)

555 return getNaturalAlignIndirect(RetTy, false);

556

559 }

560

561

562 if (getABIKind() == ARMABIKind::APCS) {

565

566

567

568

569

572 getVMContext(), getContext().getTypeSize(RetTy)));

573

574

576

577 uint64_t Size = getContext().getTypeSize(RetTy);

578 if (Size <= 8)

580 if (Size <= 16)

583 }

584

585

586 return getNaturalAlignIndirect(RetTy);

587 }

588

589

590

593

594

595 if (IsAAPCS_VFP) {

598 if (isHomogeneousAggregate(RetTy, Base, Members))

599 return classifyHomogeneousAggregate(RetTy, Base, Members);

600 }

601

602

603

604 uint64_t Size = getContext().getTypeSize(RetTy);

605 if (Size <= 32) {

606 if (getDataLayout().isBigEndian())

607

609

610

611 if (Size <= 8)

613 if (Size <= 16)

616 } else if (Size <= 128 && getABIKind() == ARMABIKind::AAPCS16_VFP) {

617 llvm::Type *Int32Ty = llvm::Type::getInt32Ty(getVMContext());

618 llvm::Type *CoerceTy =

619 llvm::ArrayType::get(Int32Ty, llvm::alignTo(Size, 32) / 32);

621 }

622

623 return getNaturalAlignIndirect(RetTy);

624}

625

626

627bool ARMABIInfo::isIllegalVectorType(QualType Ty) const {

629

630

631

632

633

634

635 if ((!getTarget().hasLegalHalfType() &&

636 (VT->getElementType()->isFloat16Type() ||

637 VT->getElementType()->isHalfType())) ||

638 (IsFloatABISoftFP &&

639 VT->getElementType()->isBFloat16Type()))

640 return true;

641 if (isAndroid()) {

642

643

644

645

646

647 unsigned NumElements = VT->getNumElements();

648

649 if (!llvm::isPowerOf2_32(NumElements) && NumElements != 3)

650 return true;

651 } else {

652

653 unsigned NumElements = VT->getNumElements();

654 uint64_t Size = getContext().getTypeSize(VT);

655

656 if (!llvm::isPowerOf2_32(NumElements))

657 return true;

658

659 return Size <= 32;

660 }

661 }

662 return false;

663}

664

665

666bool ARMABIInfo::containsAnyFP16Vectors(QualType Ty) const {

667 if (const ConstantArrayType *AT = getContext().getAsConstantArrayType(Ty)) {

668 uint64_t NElements = AT->getZExtSize();

669 if (NElements == 0)

670 return false;

671 return containsAnyFP16Vectors(AT->getElementType());

673 const RecordDecl *RD = RT->getDecl();

674

675

676 if (const CXXRecordDecl *CXXRD = dyn_cast(RD))

677 if (llvm::any_of(CXXRD->bases(), [this](const CXXBaseSpecifier &B) {

678 return containsAnyFP16Vectors(B.getType());

679 }))

680 return true;

681

683 return FD && containsAnyFP16Vectors(FD->getType());

684 }))

685 return true;

686

687 return false;

688 } else {

690 return (VT->getElementType()->isFloat16Type() ||

691 VT->getElementType()->isBFloat16Type() ||

692 VT->getElementType()->isHalfType());

693 return false;

694 }

695}

696

697bool ARMSwiftABIInfo::isLegalVectorType(CharUnits VectorSize, llvm::Type *EltTy,

698 unsigned NumElts) const {

699 if (!llvm::isPowerOf2_32(NumElts))

700 return false;

701 unsigned size = CGT.getDataLayout().getTypeStoreSizeInBits(EltTy);

702 if (size > 64)

703 return false;

705 (VectorSize.getQuantity() != 16 || NumElts == 1))

706 return false;

707 return true;

708}

709

710bool ARMABIInfo::isHomogeneousAggregateBaseType(QualType Ty) const {

711

712

714 if (BT->getKind() == BuiltinType::Float ||

715 BT->getKind() == BuiltinType::Double ||

716 BT->getKind() == BuiltinType::LongDouble)

717 return true;

719 unsigned VecSize = getContext().getTypeSize(VT);

720 if (VecSize == 64 || VecSize == 128)

721 return true;

722 }

723 return false;

724}

725

726bool ARMABIInfo::isHomogeneousAggregateSmallEnough(const Type *Base,

727 uint64_t Members) const {

728 return Members <= 4;

729}

730

731bool ARMABIInfo::isZeroLengthBitfieldPermittedInHomogeneousAggregate() const {

732

733

734

735

736

737 return true;

738}

739

740bool ARMABIInfo::isEffectivelyAAPCS_VFP(unsigned callConvention,

741 bool acceptHalf) const {

742

743 if (callConvention != llvm::CallingConv::C)

744 return (callConvention == llvm::CallingConv::ARM_AAPCS_VFP);

745 else

746 return (getABIKind() == ARMABIKind::AAPCS_VFP) ||

747 (acceptHalf && (getABIKind() == ARMABIKind::AAPCS16_VFP));

748}

749

753

754

757

758 CharUnits TySize = getContext().getTypeSizeInChars(Ty);

759 CharUnits TyAlignForABI = getContext().getTypeUnadjustedAlignInChars(Ty);

760

761

762 bool IsIndirect = false;

766 IsIndirect = true;

767

768

769

771 getABIKind() == ARMABIKind::AAPCS16_VFP &&

772 !isHomogeneousAggregate(Ty, Base, Members)) {

773 IsIndirect = true;

774

775

776

777

778

779 } else if (getABIKind() == ARMABIKind::AAPCS_VFP ||

780 getABIKind() == ARMABIKind::AAPCS) {

783 } else if (getABIKind() == ARMABIKind::AAPCS16_VFP) {

784

787 } else {

789 }

790

791 TypeInfoChars TyInfo(TySize, TyAlignForABI, AlignRequirementKind::None);

792 return emitVoidPtrVAArg(CGF, VAListAddr, Ty, IsIndirect, TyInfo, SlotSize,

793 true, Slot);

794}

795

796std::unique_ptr

798 return std::make_unique(CGM.getTypes(), Kind);

799}

800

801std::unique_ptr

803 return std::make_unique(CGM.getTypes(), K);

804}

static bool isIntegerLikeType(QualType Ty, ASTContext &Context, llvm::LLVMContext &VMContext)

Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...

const ASTRecordLayout & getASTRecordLayout(const RecordDecl *D) const

Get or compute information about the layout of the specified record (struct/union/class) D,...

uint64_t getTypeSize(QualType T) const

Return the size of the specified (complete) type T, in bits.

ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...

uint64_t getFieldOffset(unsigned FieldNo) const

getFieldOffset - Get the offset of the given field index, in bits.

Attr - This represents one attribute.

A fixed int type of a specified bitwidth.

This class is used for builtin types like 'int'.

Represents a base class of a C++ class.

Represents a C++ struct/union/class.

CharUnits - This is an opaque type for sizes expressed in character units.

QuantityType getQuantity() const

getQuantity - Get the raw integer representation of this quantity.

static CharUnits fromQuantity(QuantityType Quantity)

fromQuantity - Construct a CharUnits quantity from a raw integer type.

std::string FloatABI

The ABI to use for passing floating point arguments.

ABIArgInfo - Helper class to encapsulate information about how a specific C type should be passed to ...

static ABIArgInfo getIgnore()

static ABIArgInfo getIndirect(CharUnits Alignment, bool ByVal=true, bool Realign=false, llvm::Type *Padding=nullptr)

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)

ABIInfo - Target specific hooks for defining how a type should be passed or returned from functions.

virtual bool allowBFloatArgsAndRet() const

virtual bool isHomogeneousAggregateBaseType(QualType Ty) const

virtual bool isHomogeneousAggregateSmallEnough(const Type *Base, uint64_t Members) const

const TargetInfo & getTarget() const

virtual RValue EmitVAArg(CodeGen::CodeGenFunction &CGF, CodeGen::Address VAListAddr, QualType Ty, AggValueSlot Slot) const =0

EmitVAArg - Emit the target dependent code to load a value of.

virtual bool isZeroLengthBitfieldPermittedInHomogeneousAggregate() const

virtual void computeInfo(CodeGen::CGFunctionInfo &FI) const =0

Like RawAddress, an abstract representation of an aligned address, but the pointer contained in this ...

RecordArgABI

Specify how one should pass an argument of a record type.

@ RAA_DirectInMemory

Pass it on the stack using its defined layout.

CGFunctionInfo - Class to encapsulate the information about a function definition.

ABIArgInfo & getReturnInfo()

unsigned getCallingConvention() const

getCallingConvention - Return the user specified calling convention, which has been translated into a...

CanQualType getReturnType() const

MutableArrayRef< ArgInfo > arguments()

void setEffectiveCallingConvention(unsigned Value)

CodeGenFunction - This class organizes the per-function state that is used while generating LLVM code...

This class organizes the cross-function state that is used while generating LLVM code.

DiagnosticsEngine & getDiags() const

const LangOptions & getLangOpts() const

CodeGenTypes & getTypes()

const TargetInfo & getTarget() const

This class organizes the cross-module state that is used while lowering AST types to LLVM types.

llvm::Type * ConvertType(QualType T)

ConvertType - Convert type T into a llvm::Type.

const CodeGenOptions & getCodeGenOpts() const

const llvm::DataLayout & getDataLayout() const

RValue - This trivial value class is used to represent the result of an expression that is evaluated.

Target specific hooks for defining how a type should be passed or returned from functions with one of...

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.

TargetCodeGenInfo - This class organizes various target-specific codegeneration issues,...

virtual unsigned getSizeOfUnwindException() const

Determines the size of struct _Unwind_Exception on this platform, in 8-bit units.

virtual StringRef getARCRetainAutoreleasedReturnValueMarker() const

Retrieve the address of a function to call immediately before calling objc_retainAutoreleasedReturnVa...

static void setBranchProtectionFnAttributes(const TargetInfo::BranchProtectionInfo &BPI, llvm::Function &F)

virtual bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF, llvm::Value *Address) const

Initializes the given DWARF EH register-size table, a char*.

virtual void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV, CodeGen::CodeGenModule &M) const

setTargetAttributes - Provides a convenient hook to handle extra target-specific attributes for the g...

virtual int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const

Determines the DWARF register number for the stack pointer, for exception-handling purposes.

Complex values, per C99 6.2.5p11.

Represents the canonical version of C arrays with a specified constant size.

specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext,...

Decl - This represents one declaration (or definition), e.g.

SourceLocation getLocation() const

DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)

Issue the message to the client.

A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.

Represents a member of a struct/union/class.

bool isBitField() const

Determines whether this field is a bitfield.

Represents a function declaration or definition.

bool hasSignReturnAddress() const

Check if return address signing is enabled.

A (possibly-)qualified type.

Represents a struct/union/class.

bool hasFlexibleArrayMember() const

field_iterator field_end() const

field_range fields() const

field_iterator field_begin() const

A helper class that allows the use of isa/cast/dyncast to detect TagType objects of structs/unions/cl...

RecordDecl * getDecl() const

TargetOptions & getTargetOpts() const

Retrieve the target options.

const llvm::Triple & getTriple() const

Returns the target triple of the primary target.

virtual bool isBranchProtectionSupportedArch(StringRef Arch) const

Determine if the Architecture in this TargetInfo supports branch protection.

virtual ParsedTargetAttr parseTargetAttr(StringRef Str) const

virtual bool hasBFloat16Type() const

Determine whether the _BFloat16 type is supported on this target.

virtual bool validateBranchProtection(StringRef Spec, StringRef Arch, BranchProtectionInfo &BPI, StringRef &Err) const

Determine if this TargetInfo supports the given branch protection specification.

std::string CPU

If given, the name of the target CPU to generate code for.

The base class of the type hierarchy.

bool isPointerType() const

bool isAnyComplexType() const

bool isVectorType() const

bool isRealFloatingType() const

Floating point categories.

const T * getAs() const

Member-template getAs'.

Represents a GCC generic vector type.

ABIArgInfo classifyArgumentType(CodeGenModule &CGM, CanQualType type)

Classify the rules for how to pass a particular type.

std::unique_ptr< TargetCodeGenInfo > createARMTargetCodeGenInfo(CodeGenModule &CGM, ARMABIKind Kind)

CGCXXABI::RecordArgABI getRecordArgABI(const RecordType *RT, CGCXXABI &CXXABI)

bool classifyReturnType(const CGCXXABI &CXXABI, CGFunctionInfo &FI, const ABIInfo &Info)

RValue emitVoidPtrVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType ValueTy, bool IsIndirect, TypeInfoChars ValueInfo, CharUnits SlotSizeAndAlign, bool AllowHigherAlign, AggValueSlot Slot, bool ForceRightAdjust=false)

Emit va_arg for a platform using the common void* representation, where arguments are simply emitted ...

bool isAggregateTypeForABI(QualType T)

std::unique_ptr< TargetCodeGenInfo > createWindowsARMTargetCodeGenInfo(CodeGenModule &CGM, ARMABIKind K)

void AssignToArrayRange(CodeGen::CGBuilderTy &Builder, llvm::Value *Array, llvm::Value *Value, unsigned FirstIndex, unsigned LastIndex)

QualType useFirstFieldIfTransparentUnion(QualType Ty)

Pass transparent unions as if they were the type of the first element.

bool isEmptyRecord(ASTContext &Context, QualType T, bool AllowArrays, bool AsIfNoUniqueAddr=false)

isEmptyRecord - Return true iff a structure contains only empty fields.

The JSON file list parser is used to communicate input to InstallAPI.

llvm::IntegerType * Int8Ty

i8, i16, i32, and i64

Contains information gathered from parsing the contents of TargetAttr.