clang 23.0.0git
TargetInfo.cpp
Go to the documentation of this file.
1//===--- TargetInfo.cpp - Information about Target machine ----------------===//
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// This file implements the TargetInfo interface.
10//
11//===----------------------------------------------------------------------===//
12
19#include "llvm/ADT/APFloat.h"
20#include "llvm/ADT/STLExtras.h"
21#include "llvm/ADT/StringExtras.h"
22#include "llvm/Support/ErrorHandling.h"
23#include "llvm/TargetParser/TargetParser.h"
24#include <cstdlib>
25using namespace clang;
26
27static const LangASMap DefaultAddrSpaceMap = {0};
28// The fake address space map must have a distinct entry for each
29// language-specific address space.
31 0, // Default
32 1, // opencl_global
33 3, // opencl_local
34 2, // opencl_constant
35 0, // opencl_private
36 4, // opencl_generic
37 5, // opencl_global_device
38 6, // opencl_global_host
39 7, // cuda_device
40 8, // cuda_constant
41 9, // cuda_shared
42 1, // sycl_global
43 5, // sycl_global_device
44 6, // sycl_global_host
45 3, // sycl_local
46 0, // sycl_private
47 10, // ptr32_sptr
48 11, // ptr32_uptr
49 12, // ptr64
50 13, // hlsl_groupshared
51 14, // hlsl_constant
52 15, // hlsl_private
53 16, // hlsl_device
54 17, // hlsl_input
55 18, // hlsl_output
56 19, // hlsl_push_constant
57 20, // wasm_funcref
58};
59
60// TargetInfo Constructor.
61TargetInfo::TargetInfo(const llvm::Triple &T) : Triple(T) {
62 // Set defaults. Defaults are set for a 32-bit RISC platform, like PPC or
63 // SPARC. These should be overridden by concrete targets as needed.
64 HasMustTail = true;
65 BigEndian = !T.isLittleEndian();
66 TLSSupported = true;
67 VLASupported = true;
68 NoAsmVariants = false;
69 HasFastHalfType = false;
70 HalfArgsAndReturns = false;
71 HasFloat128 = false;
72 HasIbm128 = false;
73 HasFloat16 = false;
74 HasBFloat16 = false;
75 HasFullBFloat16 = false;
76 HasLongDouble = true;
77 HasFPReturn = true;
78 HasStrictFP = false;
80 BoolWidth = BoolAlign = 8;
82 IntWidth = IntAlign = 32;
83 LongWidth = LongAlign = 32;
85 Int128Align = 128;
86
87 // Fixed point default bit widths
94
95 // Fixed point default integral and fractional bit sizes
96 // We give the _Accum 1 fewer fractional bits than their corresponding _Fract
97 // types by default to have the same number of fractional bits between _Accum
98 // and _Fract types.
100 ShortAccumScale = 7;
101 AccumScale = 15;
102 LongAccumScale = 31;
103
104 SuitableAlign = 64;
106 MinGlobalAlign = 0;
107 // From the glibc documentation, on GNU systems, malloc guarantees 16-byte
108 // alignment on 64-bit systems and 8-byte alignment on 32-bit systems. See
109 // https://www.gnu.org/software/libc/manual/html_node/Malloc-Examples.html.
110 // This alignment guarantee also applies to Windows and Android. On Darwin
111 // and OpenBSD, the alignment is 16 bytes on both 64-bit and 32-bit systems.
112 if (T.isGNUEnvironment() || T.isWindowsMSVCEnvironment() || T.isAndroid() ||
113 T.isOHOSFamily())
114 NewAlign = Triple.isArch64Bit() ? 128 : Triple.isArch32Bit() ? 64 : 0;
115 else if (T.isOSDarwin() || T.isOSOpenBSD())
116 NewAlign = 128;
117 else
118 NewAlign = 0; // Infer from basic type alignment.
119 HalfWidth = 16;
120 HalfAlign = 16;
121 FloatWidth = 32;
122 FloatAlign = 32;
123 DoubleWidth = 64;
124 DoubleAlign = 64;
125 LongDoubleWidth = 64;
126 LongDoubleAlign = 64;
127 Float128Align = 128;
128 Ibm128Align = 128;
130 LargeArrayAlign = 0;
132 MaxVectorAlign = 0;
133 MaxTLSAlign = 0;
155 HalfFormat = &llvm::APFloat::IEEEhalf();
156 FloatFormat = &llvm::APFloat::IEEEsingle();
157 DoubleFormat = &llvm::APFloat::IEEEdouble();
158 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
159 Float128Format = &llvm::APFloat::IEEEquad();
160 Ibm128Format = &llvm::APFloat::PPCDoubleDouble();
161 MCountName = "mcount";
162 UserLabelPrefix = Triple.isOSBinFormatMachO() ? "_" : "";
163 RegParmMax = 0;
164 SSERegParmMax = 0;
165 HasAlignMac68kSupport = false;
166 HasBuiltinMSVaList = false;
167 HasAArch64ACLETypes = false;
168 HasRISCVVTypes = false;
170 HasUnalignedAccess = false;
172
173 // Default to no types using fpret.
175
176 // Default to not using fp2ret for __Complex long double
178
179 // Set the C++ ABI based on the triple.
180 TheCXXABI.set(Triple.isKnownWindowsMSVCEnvironment() || Triple.isUEFI()
181 ? TargetCXXABI::Microsoft
182 : TargetCXXABI::GenericItanium);
183
184 HasMicrosoftRecordLayout = TheCXXABI.isMicrosoft();
185
186 // Default to an empty address space map.
189
190 // Default to an unknown platform name.
191 PlatformName = "unknown";
192 PlatformMinVersion = VersionTuple();
193
195
196 MaxBitIntWidth.reset();
197}
198
199// Out of line virtual dtor for TargetInfo.
201
202void TargetInfo::resetDataLayout(StringRef DL) { DataLayoutString = DL.str(); }
203
205 DataLayoutString = Triple.computeDataLayout(getABI());
206}
207
208bool
210 Diags.Report(diag::err_opt_not_valid_on_target) << "cf-protection=branch";
211 return false;
212}
213
215 // if this hook is called, the target should override it to return a
216 // non-default scheme
217 llvm::report_fatal_error("not implemented");
218}
219
221 const CFBranchLabelSchemeKind Scheme, DiagnosticsEngine &Diags) const {
223 Diags.Report(diag::err_opt_not_valid_on_target)
224 << (Twine("mcf-branch-label-scheme=") +
226 .str();
227 return false;
228}
229
230bool
232 Diags.Report(diag::err_opt_not_valid_on_target) << "cf-protection=return";
233 return false;
234}
235
236/// getTypeName - Return the user string for the specified integer type enum.
237/// For example, SignedShort -> "short".
239 switch (T) {
240 default: llvm_unreachable("not an integer!");
241 case SignedChar: return "signed char";
242 case UnsignedChar: return "unsigned char";
243 case SignedShort: return "short";
244 case UnsignedShort: return "unsigned short";
245 case SignedInt: return "int";
246 case UnsignedInt: return "unsigned int";
247 case SignedLong: return "long int";
248 case UnsignedLong: return "long unsigned int";
249 case SignedLongLong: return "long long int";
250 case UnsignedLongLong: return "long long unsigned int";
251 }
252}
253
254/// getTypeConstantSuffix - Return the constant suffix for the specified
255/// integer type enum. For example, SignedLong -> "L".
257 switch (T) {
258 default: llvm_unreachable("not an integer!");
259 case SignedChar:
260 case SignedShort:
261 case SignedInt: return "";
262 case SignedLong: return "L";
263 case SignedLongLong: return "LL";
264 case UnsignedChar:
265 if (getCharWidth() < getIntWidth())
266 return "";
267 [[fallthrough]];
268 case UnsignedShort:
269 if (getShortWidth() < getIntWidth())
270 return "";
271 [[fallthrough]];
272 case UnsignedInt: return "U";
273 case UnsignedLong: return "UL";
274 case UnsignedLongLong: return "ULL";
275 }
276}
277
278/// getTypeFormatModifier - Return the printf format modifier for the
279/// specified integer type enum. For example, SignedLong -> "l".
280
282 switch (T) {
283 default: llvm_unreachable("not an integer!");
284 case SignedChar:
285 case UnsignedChar: return "hh";
286 case SignedShort:
287 case UnsignedShort: return "h";
288 case SignedInt:
289 case UnsignedInt: return "";
290 case SignedLong:
291 case UnsignedLong: return "l";
292 case SignedLongLong:
293 case UnsignedLongLong: return "ll";
294 }
295}
296
297/// getTypeWidth - Return the width (in bits) of the specified integer type
298/// enum. For example, SignedInt -> getIntWidth().
300 switch (T) {
301 default: llvm_unreachable("not an integer!");
302 case SignedChar:
303 case UnsignedChar: return getCharWidth();
304 case SignedShort:
305 case UnsignedShort: return getShortWidth();
306 case SignedInt:
307 case UnsignedInt: return getIntWidth();
308 case SignedLong:
309 case UnsignedLong: return getLongWidth();
310 case SignedLongLong:
311 case UnsignedLongLong: return getLongLongWidth();
312 };
313}
314
316 unsigned BitWidth, bool IsSigned) const {
317 if (getCharWidth() == BitWidth)
318 return IsSigned ? SignedChar : UnsignedChar;
319 if (getShortWidth() == BitWidth)
320 return IsSigned ? SignedShort : UnsignedShort;
321 if (getIntWidth() == BitWidth)
322 return IsSigned ? SignedInt : UnsignedInt;
323 if (getLongWidth() == BitWidth)
324 return IsSigned ? SignedLong : UnsignedLong;
325 if (getLongLongWidth() == BitWidth)
326 return IsSigned ? SignedLongLong : UnsignedLongLong;
327 return NoInt;
328}
329
331 bool IsSigned) const {
332 if (getCharWidth() >= BitWidth)
333 return IsSigned ? SignedChar : UnsignedChar;
334 if (getShortWidth() >= BitWidth)
335 return IsSigned ? SignedShort : UnsignedShort;
336 if (getIntWidth() >= BitWidth)
337 return IsSigned ? SignedInt : UnsignedInt;
338 if (getLongWidth() >= BitWidth)
339 return IsSigned ? SignedLong : UnsignedLong;
340 if (getLongLongWidth() >= BitWidth)
341 return IsSigned ? SignedLongLong : UnsignedLongLong;
342 return NoInt;
343}
344
346 FloatModeKind ExplicitType) const {
347 if (getHalfWidth() == BitWidth)
348 return FloatModeKind::Half;
349 if (getFloatWidth() == BitWidth)
351 if (getDoubleWidth() == BitWidth)
353
354 switch (BitWidth) {
355 case 96:
356 if (&getLongDoubleFormat() == &llvm::APFloat::x87DoubleExtended())
358 break;
359 case 128:
360 // The caller explicitly asked for an IEEE compliant type but we still
361 // have to check if the target supports it.
362 if (ExplicitType == FloatModeKind::Float128)
365 if (ExplicitType == FloatModeKind::Ibm128)
368 if (&getLongDoubleFormat() == &llvm::APFloat::PPCDoubleDouble() ||
369 &getLongDoubleFormat() == &llvm::APFloat::IEEEquad())
371 if (hasFloat128Type())
373 break;
374 }
375
377}
378
379/// getTypeAlign - Return the alignment (in bits) of the specified integer type
380/// enum. For example, SignedInt -> getIntAlign().
382 switch (T) {
383 default: llvm_unreachable("not an integer!");
384 case SignedChar:
385 case UnsignedChar: return getCharAlign();
386 case SignedShort:
387 case UnsignedShort: return getShortAlign();
388 case SignedInt:
389 case UnsignedInt: return getIntAlign();
390 case SignedLong:
391 case UnsignedLong: return getLongAlign();
392 case SignedLongLong:
393 case UnsignedLongLong: return getLongLongAlign();
394 };
395}
396
397/// isTypeSigned - Return whether an integer types is signed. Returns true if
398/// the type is signed; false otherwise.
400 switch (T) {
401 default: llvm_unreachable("not an integer!");
402 case SignedChar:
403 case SignedShort:
404 case SignedInt:
405 case SignedLong:
406 case SignedLongLong:
407 return true;
408 case UnsignedChar:
409 case UnsignedShort:
410 case UnsignedInt:
411 case UnsignedLong:
412 case UnsignedLongLong:
413 return false;
414 };
415}
416
417/// adjust - Set forced language options.
418/// Apply changes to the target information with respect to certain
419/// language options which change the target configuration and adjust
420/// the language based on the target options where applicable.
422 const TargetInfo *Aux) {
423 if (Opts.NoBitFieldTypeAlign)
425
426 switch (Opts.WCharSize) {
427 default: llvm_unreachable("invalid wchar_t width");
428 case 0: break;
429 case 1: WCharType = Opts.WCharIsSigned ? SignedChar : UnsignedChar; break;
430 case 2: WCharType = Opts.WCharIsSigned ? SignedShort : UnsignedShort; break;
431 case 4: WCharType = Opts.WCharIsSigned ? SignedInt : UnsignedInt; break;
432 }
433
434 if (Opts.AlignDouble) {
436 LongDoubleAlign = 64;
437 }
438
439 // HLSL explicitly defines the sizes and formats of some data types, and we
440 // need to conform to those regardless of what architecture you are targeting.
441 if (Opts.HLSL) {
442 BoolWidth = BoolAlign = 32;
443 LongWidth = LongAlign = 64;
444 if (!Opts.NativeHalfType) {
445 HalfFormat = &llvm::APFloat::IEEEsingle();
446 HalfWidth = HalfAlign = 32;
447 }
448 }
449
450 if (Opts.OpenCL) {
451 // OpenCL C requires specific widths for types, irrespective of
452 // what these normally are for the target.
453 // We also define long long and long double here, although the
454 // OpenCL standard only mentions these as "reserved".
455 ShortWidth = ShortAlign = 16;
456 IntWidth = IntAlign = 32;
457 LongWidth = LongAlign = 64;
459 HalfWidth = HalfAlign = 16;
460 FloatWidth = FloatAlign = 32;
461
462 // Embedded 32-bit targets (OpenCL EP) might have double C type
463 // defined as float. Let's not override this as it might lead
464 // to generating illegal code that uses 64bit doubles.
465 if (DoubleWidth != FloatWidth) {
467 DoubleFormat = &llvm::APFloat::IEEEdouble();
468 }
470
471 unsigned MaxPointerWidth = getMaxPointerWidth();
472 assert(MaxPointerWidth == 32 || MaxPointerWidth == 64);
473 bool Is32BitArch = MaxPointerWidth == 32;
474 SizeType = Is32BitArch ? UnsignedInt : UnsignedLong;
475 PtrDiffType = Is32BitArch ? SignedInt : SignedLong;
476 IntPtrType = Is32BitArch ? SignedInt : SignedLong;
477
480
481 HalfFormat = &llvm::APFloat::IEEEhalf();
482 FloatFormat = &llvm::APFloat::IEEEsingle();
483 LongDoubleFormat = &llvm::APFloat::IEEEquad();
484
485 // OpenCL C v3.0 s6.7.5 - The generic address space requires support for
486 // OpenCL C 2.0 or OpenCL C 3.0 with the __opencl_c_generic_address_space
487 // feature
488 // OpenCL C v3.0 s6.2.1 - OpenCL pipes require support of OpenCL C 2.0
489 // or later and __opencl_c_pipes feature
490 // FIXME: These language options are also defined in setLangDefaults()
491 // for OpenCL C 2.0 but with no access to target capabilities. Target
492 // should be immutable once created and thus these language options need
493 // to be defined only once.
494 if (Opts.getOpenCLCompatibleVersion() == 300) {
495 const auto &OpenCLFeaturesMap = getSupportedOpenCLOpts();
496 Opts.OpenCLGenericAddressSpace = hasFeatureEnabled(
497 OpenCLFeaturesMap, "__opencl_c_generic_address_space");
498 Opts.OpenCLPipes =
499 hasFeatureEnabled(OpenCLFeaturesMap, "__opencl_c_pipes");
500 Opts.Blocks =
501 hasFeatureEnabled(OpenCLFeaturesMap, "__opencl_c_device_enqueue");
502 }
503 }
504
505 if (Opts.DoubleSize) {
506 if (Opts.DoubleSize == 32) {
507 DoubleWidth = 32;
508 LongDoubleWidth = 32;
509 DoubleFormat = &llvm::APFloat::IEEEsingle();
510 LongDoubleFormat = &llvm::APFloat::IEEEsingle();
511 } else if (Opts.DoubleSize == 64) {
512 DoubleWidth = 64;
513 LongDoubleWidth = 64;
514 DoubleFormat = &llvm::APFloat::IEEEdouble();
515 LongDoubleFormat = &llvm::APFloat::IEEEdouble();
516 }
517 }
518
519 if (Opts.LongDoubleSize) {
520 if (Opts.LongDoubleSize == DoubleWidth) {
524 } else if (Opts.LongDoubleSize == 128) {
526 LongDoubleFormat = &llvm::APFloat::IEEEquad();
527 } else if (Opts.LongDoubleSize == 80) {
528 LongDoubleFormat = &llvm::APFloat::x87DoubleExtended();
529 if (getTriple().isWindowsMSVCEnvironment()) {
530 LongDoubleWidth = 128;
531 LongDoubleAlign = 128;
532 } else { // Linux
533 if (getTriple().getArch() == llvm::Triple::x86) {
534 LongDoubleWidth = 96;
535 LongDoubleAlign = 32;
536 } else {
537 LongDoubleWidth = 128;
538 LongDoubleAlign = 128;
539 }
540 }
541 }
542 }
543
544 if (Opts.NewAlignOverride)
545 NewAlign = Opts.NewAlignOverride * getCharWidth();
546
547 // Each unsigned fixed point type has the same number of fractional bits as
548 // its corresponding signed type.
549 PaddingOnUnsignedFixedPoint |= Opts.PaddingOnUnsignedFixedPoint;
550 CheckFixedPointBits();
551
552 if (Opts.ProtectParens && !checkArithmeticFenceSupported()) {
553 Diags.Report(diag::err_opt_not_valid_on_target) << "-fprotect-parens";
554 Opts.ProtectParens = false;
555 }
556
557 if (Opts.MaxBitIntWidth)
558 MaxBitIntWidth = static_cast<unsigned>(Opts.MaxBitIntWidth);
559
560 if (Opts.FakeAddressSpaceMap)
562
563 // Check if it's CUDA device compilation; ensure layout consistency with host.
564 if (Opts.CUDA && Opts.CUDAIsDevice && Aux && !HasMicrosoftRecordLayout)
566}
567
569 llvm::StringMap<bool> &Features, DiagnosticsEngine &Diags, StringRef CPU,
570 const std::vector<std::string> &FeatureVec) const {
571 for (StringRef Name : FeatureVec) {
572 if (Name.empty())
573 continue;
574 // Apply the feature via the target.
575 if (Name[0] != '+' && Name[0] != '-')
576 Diags.Report(diag::warn_fe_backend_invalid_feature_flag) << Name;
577 else
578 setFeatureEnabled(Features, Name.substr(1), Name[0] == '+');
579 }
580 return true;
581}
582
585 if (Features == "default")
586 return Ret;
587 SmallVector<StringRef, 1> AttrFeatures;
588 Features.split(AttrFeatures, ",");
589
590 // Grab the various features and prepend a "+" to turn on the feature to
591 // the backend and add them to our existing set of features.
592 for (auto &Feature : AttrFeatures) {
593 // Go ahead and trim whitespace rather than either erroring or
594 // accepting it weirdly.
595 Feature = Feature.trim();
596
597 // TODO: Support the fpmath option. It will require checking
598 // overall feature validity for the function with the rest of the
599 // attributes on the function.
600 if (Feature.starts_with("fpmath="))
601 continue;
602
603 if (Feature.starts_with("branch-protection=")) {
604 Ret.BranchProtection = Feature.split('=').second.trim();
605 continue;
606 }
607
608 // While we're here iterating check for a different target cpu.
609 if (Feature.starts_with("arch=")) {
610 if (!Ret.CPU.empty())
611 Ret.Duplicate = "arch=";
612 else
613 Ret.CPU = Feature.split("=").second.trim();
614 } else if (Feature.starts_with("tune=")) {
615 if (!Ret.Tune.empty())
616 Ret.Duplicate = "tune=";
617 else
618 Ret.Tune = Feature.split("=").second.trim();
619 } else if (Feature.starts_with("no-"))
620 Ret.Features.push_back("-" + Feature.split("-").second.str());
621 else
622 Ret.Features.push_back("+" + Feature.str());
623 }
624 return Ret;
625}
626
628TargetInfo::getCallingConvKind(bool ClangABICompat4) const {
629 if (getCXXABI() != TargetCXXABI::Microsoft &&
630 (ClangABICompat4 || getTriple().isPS4()))
631 return CCK_ClangABI4OrPS4;
632 return CCK_Default;
633}
634
636 const LangOptions &LangOpts) const {
637 if (getCXXABI() == TargetCXXABI::Microsoft &&
638 LangOpts.getClangABICompat() > LangOptions::ClangABI::Ver21)
639 return true;
640 return false;
641}
642
644 if (getCXXABI() == TargetCXXABI::Microsoft &&
645 LangOpts.getClangABICompat() > LangOptions::ClangABI::Ver21)
646 return true;
647 return false;
648}
649
651 return LangOpts.getClangABICompat() > LangOptions::ClangABI::Ver15;
652}
653
655 auto &Opts = getSupportedOpenCLOpts();
656 if (!hasFeatureEnabled(Opts, "cl_khr_fp64") ||
657 !hasFeatureEnabled(Opts, "__opencl_c_fp64")) {
658 setFeatureEnabled(Opts, "__opencl_c_ext_fp64_global_atomic_add", false);
659 setFeatureEnabled(Opts, "__opencl_c_ext_fp64_local_atomic_add", false);
660 setFeatureEnabled(Opts, "__opencl_c_ext_fp64_global_atomic_min_max", false);
661 setFeatureEnabled(Opts, "__opencl_c_ext_fp64_local_atomic_min_max", false);
662 }
663}
664
666 switch (TK) {
667 case OCLTK_Image:
668 case OCLTK_Pipe:
670
671 case OCLTK_Sampler:
673
674 default:
675 return LangAS::Default;
676 }
677}
678
679//===----------------------------------------------------------------------===//
680
681
682static StringRef removeGCCRegisterPrefix(StringRef Name) {
683 if (Name[0] == '%' || Name[0] == '#')
684 Name = Name.substr(1);
685
686 return Name;
687}
688
689/// isValidClobber - Returns whether the passed in string is
690/// a valid clobber in an inline asm statement. This is used by
691/// Sema.
692bool TargetInfo::isValidClobber(StringRef Name) const {
693 return (isValidGCCRegisterName(Name) || Name == "memory" || Name == "cc" ||
694 Name == "unwind");
695}
696
697/// isValidGCCRegisterName - Returns whether the passed in string
698/// is a valid register name according to GCC. This is used by Sema for
699/// inline asm statements.
700bool TargetInfo::isValidGCCRegisterName(StringRef Name) const {
701 if (Name.empty())
702 return false;
703
704 // Get rid of any register prefix.
705 Name = removeGCCRegisterPrefix(Name);
706 if (Name.empty())
707 return false;
708
710
711 // If we have a number it maps to an entry in the register name array.
712 if (isDigit(Name[0])) {
713 unsigned n;
714 if (!Name.getAsInteger(0, n))
715 return n < Names.size();
716 }
717
718 // Check register names.
719 if (llvm::is_contained(Names, Name))
720 return true;
721
722 // Check any additional names that we have.
723 for (const AddlRegName &ARN : getGCCAddlRegNames())
724 for (const char *AN : ARN.Names) {
725 if (!AN)
726 break;
727 // Make sure the register that the additional name is for is within
728 // the bounds of the register names from above.
729 if (AN == Name && ARN.RegNum < Names.size())
730 return true;
731 }
732
733 // Now check aliases.
734 for (const GCCRegAlias &GRA : getGCCRegAliases())
735 for (const char *A : GRA.Aliases) {
736 if (!A)
737 break;
738 if (A == Name)
739 return true;
740 }
741
742 return false;
743}
744
746 bool ReturnCanonical) const {
747 assert(isValidGCCRegisterName(Name) && "Invalid register passed in");
748
749 // Get rid of any register prefix.
750 Name = removeGCCRegisterPrefix(Name);
751
753
754 // First, check if we have a number.
755 if (isDigit(Name[0])) {
756 unsigned n;
757 if (!Name.getAsInteger(0, n)) {
758 assert(n < Names.size() && "Out of bounds register number!");
759 return Names[n];
760 }
761 }
762
763 // Check any additional names that we have.
764 for (const AddlRegName &ARN : getGCCAddlRegNames())
765 for (const char *AN : ARN.Names) {
766 if (!AN)
767 break;
768 // Make sure the register that the additional name is for is within
769 // the bounds of the register names from above.
770 if (AN == Name && ARN.RegNum < Names.size())
771 return ReturnCanonical ? Names[ARN.RegNum] : Name;
772 }
773
774 // Now check aliases.
775 for (const GCCRegAlias &RA : getGCCRegAliases())
776 for (const char *A : RA.Aliases) {
777 if (!A)
778 break;
779 if (A == Name)
780 return RA.Register;
781 }
782
783 return Name;
784}
785
787 const char *Name = Info.getConstraintStr().c_str();
788 // An output constraint must start with '=' or '+'
789 if (*Name != '=' && *Name != '+')
790 return false;
791
792 if (*Name == '+')
793 Info.setIsReadWrite();
794
795 Name++;
796 while (*Name) {
797 switch (*Name) {
798 default:
799 if (!validateAsmConstraint(Name, Info)) {
800 // FIXME: We temporarily return false
801 // so we can add more constraints as we hit it.
802 // Eventually, an unknown constraint should just be treated as 'g'.
803 return false;
804 }
805 break;
806 case '&': // early clobber.
807 Info.setEarlyClobber();
808 break;
809 case '%': // commutative.
810 // FIXME: Check that there is a another register after this one.
811 break;
812 case 'r': // general register.
813 Info.setAllowsRegister();
814 break;
815 case 'm': // memory operand.
816 case 'o': // offsetable memory operand.
817 case 'V': // non-offsetable memory operand.
818 case '<': // autodecrement memory operand.
819 case '>': // autoincrement memory operand.
820 Info.setAllowsMemory();
821 break;
822 case 'g': // general register, memory operand or immediate integer.
823 case 'X': // any operand.
824 Info.setAllowsRegister();
825 Info.setAllowsMemory();
826 break;
827 case ',': // multiple alternative constraint. Pass it.
828 // Handle additional optional '=' or '+' modifiers.
829 if (Name[1] == '=' || Name[1] == '+')
830 Name++;
831 break;
832 case '#': // Ignore as constraint.
833 while (Name[1] && Name[1] != ',')
834 Name++;
835 break;
836 case '?': // Disparage slightly code.
837 case '!': // Disparage severely.
838 case '*': // Ignore for choosing register preferences.
839 case 'i': // Ignore i,n,E,F as output constraints (match from the other
840 // chars)
841 case 'n':
842 case 'E':
843 case 'F':
844 break; // Pass them.
845 }
846
847 Name++;
848 }
849
850 // Early clobber with a read-write constraint which doesn't permit registers
851 // is invalid.
852 if (Info.earlyClobber() && Info.isReadWrite() && !Info.allowsRegister())
853 return false;
854
855 // If a constraint allows neither memory nor register operands it contains
856 // only modifiers. Reject it.
857 return Info.allowsMemory() || Info.allowsRegister();
858}
859
860bool TargetInfo::resolveSymbolicName(const char *&Name,
861 ArrayRef<ConstraintInfo> OutputConstraints,
862 unsigned &Index) const {
863 assert(*Name == '[' && "Symbolic name did not start with '['");
864 Name++;
865 const char *Start = Name;
866 while (*Name && *Name != ']')
867 Name++;
868
869 if (!*Name) {
870 // Missing ']'
871 return false;
872 }
873
874 std::string SymbolicName(Start, Name - Start);
875
876 for (Index = 0; Index != OutputConstraints.size(); ++Index)
877 if (SymbolicName == OutputConstraints[Index].getName())
878 return true;
879
880 return false;
881}
882
884 MutableArrayRef<ConstraintInfo> OutputConstraints,
885 ConstraintInfo &Info) const {
886 const char *Name = Info.ConstraintStr.c_str();
887
888 if (!*Name)
889 return false;
890
891 while (*Name) {
892 switch (*Name) {
893 default:
894 // Check if we have a matching constraint
895 if (*Name >= '0' && *Name <= '9') {
896 const char *DigitStart = Name;
897 while (Name[1] >= '0' && Name[1] <= '9')
898 Name++;
899 const char *DigitEnd = Name;
900 unsigned i;
901 if (StringRef(DigitStart, DigitEnd - DigitStart + 1)
902 .getAsInteger(10, i))
903 return false;
904
905 // Check if matching constraint is out of bounds.
906 if (i >= OutputConstraints.size()) return false;
907
908 // A number must refer to an output only operand.
909 if (OutputConstraints[i].isReadWrite())
910 return false;
911
912 // If the constraint is already tied, it must be tied to the
913 // same operand referenced to by the number.
914 if (Info.hasTiedOperand() && Info.getTiedOperand() != i)
915 return false;
916
917 // The constraint should have the same info as the respective
918 // output constraint.
919 Info.setTiedOperand(i, OutputConstraints[i]);
920 } else if (!validateAsmConstraint(Name, Info)) {
921 // FIXME: This error return is in place temporarily so we can
922 // add more constraints as we hit it. Eventually, an unknown
923 // constraint should just be treated as 'g'.
924 return false;
925 }
926 break;
927 case '[': {
928 unsigned Index = 0;
929 if (!resolveSymbolicName(Name, OutputConstraints, Index))
930 return false;
931
932 // If the constraint is already tied, it must be tied to the
933 // same operand referenced to by the number.
934 if (Info.hasTiedOperand() && Info.getTiedOperand() != Index)
935 return false;
936
937 // A number must refer to an output only operand.
938 if (OutputConstraints[Index].isReadWrite())
939 return false;
940
941 Info.setTiedOperand(Index, OutputConstraints[Index]);
942 break;
943 }
944 case '%': // commutative
945 // FIXME: Fail if % is used with the last operand.
946 break;
947 case 'i': // immediate integer.
948 break;
949 case 'n': // immediate integer with a known value.
951 break;
952 case 'I': // Various constant constraints with target-specific meanings.
953 case 'J':
954 case 'K':
955 case 'L':
956 case 'M':
957 case 'N':
958 case 'O':
959 case 'P':
960 if (!validateAsmConstraint(Name, Info))
961 return false;
962 break;
963 case 'r': // general register.
964 Info.setAllowsRegister();
965 break;
966 case 'm': // memory operand.
967 case 'o': // offsettable memory operand.
968 case 'V': // non-offsettable memory operand.
969 case '<': // autodecrement memory operand.
970 case '>': // autoincrement memory operand.
971 Info.setAllowsMemory();
972 break;
973 case 'g': // general register, memory operand or immediate integer.
974 case 'X': // any operand.
975 Info.setAllowsRegister();
976 Info.setAllowsMemory();
977 break;
978 case 'E': // immediate floating point.
979 case 'F': // immediate floating point.
980 case 'p': // address operand.
981 break;
982 case ',': // multiple alternative constraint. Ignore comma.
983 break;
984 case '#': // Ignore as constraint.
985 while (Name[1] && Name[1] != ',')
986 Name++;
987 break;
988 case '?': // Disparage slightly code.
989 case '!': // Disparage severely.
990 case '*': // Ignore for choosing register preferences.
991 break; // Pass them.
992 }
993
994 Name++;
995 }
996
997 return true;
998}
999
1000bool TargetInfo::validatePointerAuthKey(const llvm::APSInt &value) const {
1001 return false;
1002}
1003
1004void TargetInfo::CheckFixedPointBits() const {
1005 // Check that the number of fractional and integral bits (and maybe sign) can
1006 // fit into the bits given for a fixed point type.
1008 assert(AccumScale + getAccumIBits() + 1 <= AccumWidth);
1015
1016 assert(getShortFractScale() + 1 <= ShortFractWidth);
1017 assert(getFractScale() + 1 <= FractWidth);
1018 assert(getLongFractScale() + 1 <= LongFractWidth);
1020 assert(getUnsignedFractScale() <= FractWidth);
1022
1023 // Each unsigned fract type has either the same number of fractional bits
1024 // as, or one more fractional bit than, its corresponding signed fract type.
1027 assert(getFractScale() == getUnsignedFractScale() ||
1031
1032 // When arranged in order of increasing rank (see 6.3.1.3a), the number of
1033 // fractional bits is nondecreasing for each of the following sets of
1034 // fixed-point types:
1035 // - signed fract types
1036 // - unsigned fract types
1037 // - signed accum types
1038 // - unsigned accum types.
1039 assert(getLongFractScale() >= getFractScale() &&
1046
1047 // When arranged in order of increasing rank (see 6.3.1.3a), the number of
1048 // integral bits is nondecreasing for each of the following sets of
1049 // fixed-point types:
1050 // - signed accum types
1051 // - unsigned accum types
1052 assert(getLongAccumIBits() >= getAccumIBits() &&
1056
1057 // Each signed accum type has at least as many integral bits as its
1058 // corresponding unsigned accum type.
1060 assert(getAccumIBits() >= getUnsignedAccumIBits());
1062}
1063
1065 auto *Target = static_cast<TransferrableTargetInfo*>(this);
1066 auto *Src = static_cast<const TransferrableTargetInfo*>(Aux);
1067 *Target = *Src;
1068}
1069
1070std::string
1072 SmallVectorImpl<ConstraintInfo> *OutCons) const {
1073 std::string Result;
1074
1075 for (const char *I = Constraint.begin(), *E = Constraint.end(); I < E; I++) {
1076 switch (*I) {
1077 default:
1079 break;
1080 // Ignore these
1081 case '*':
1082 case '?':
1083 case '!':
1084 case '=': // Will see this and the following in mult-alt constraints.
1085 case '+':
1086 break;
1087 case '#': // Ignore the rest of the constraint alternative.
1088 while (I + 1 != E && I[1] != ',')
1089 I++;
1090 break;
1091 case '&':
1092 case '%':
1093 Result += *I;
1094 while (I + 1 != E && I[1] == *I)
1095 I++;
1096 break;
1097 case ',':
1098 Result += "|";
1099 break;
1100 case 'g':
1101 Result += "imr";
1102 break;
1103 case '[': {
1104 assert(OutCons &&
1105 "Must pass output names to constraints with a symbolic name");
1106 unsigned Index;
1107 bool ResolveResult = resolveSymbolicName(I, *OutCons, Index);
1108 assert(ResolveResult && "Could not resolve symbolic name");
1109 (void)ResolveResult;
1110 Result += llvm::utostr(Index);
1111 break;
1112 }
1113 }
1114 }
1115 return Result;
1116}
Provides definitions for the various language-specific address spaces.
Defines the Diagnostic-related interfaces.
static const LangASMap DefaultAddrSpaceMap
static StringRef removeGCCRegisterPrefix(StringRef Name)
static const LangASMap FakeAddrSpaceMap
Defines the clang::LangOptions interface.
Concrete class used by the front-end to report problems and issues.
Definition Diagnostic.h:232
DiagnosticBuilder Report(SourceLocation Loc, unsigned DiagID)
Issue the message to the client.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
unsigned getOpenCLCompatibleVersion() const
Return the OpenCL version that kernel language is compatible with.
bool isMicrosoft() const
Is this ABI an MSVC-compatible ABI?
virtual bool validatePointerAuthKey(const llvm::APSInt &value) const
Determine whether the given pointer-authentication key is valid.
unsigned getUnsignedLongFractScale() const
getUnsignedLongFractScale - Return the number of fractional bits in a 'unsigned long _Fract' type.
Definition TargetInfo.h:671
bool validateInputConstraint(MutableArrayRef< ConstraintInfo > OutputConstraints, ConstraintInfo &info) const
virtual ~TargetInfo()
bool resolveSymbolicName(const char *&Name, ArrayRef< ConstraintInfo > OutputConstraints, unsigned &Index) const
void copyAuxTarget(const TargetInfo *Aux)
Copy type and layout related info.
TargetInfo(const llvm::Triple &T)
virtual bool checkCFProtectionReturnSupported(DiagnosticsEngine &Diags) const
Check if the target supports CFProtection return.
unsigned getShortWidth() const
getShortWidth/Align - Return the size of 'signed short' and 'unsigned short' for this target,...
Definition TargetInfo.h:526
unsigned getUnsignedAccumScale() const
getUnsignedAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned _Accum' ty...
Definition TargetInfo.h:625
unsigned getIntAlign() const
Definition TargetInfo.h:532
virtual ArrayRef< AddlRegName > getGCCAddlRegNames() const
unsigned getUnsignedAccumIBits() const
Definition TargetInfo.h:628
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
const LangASMap * AddrSpaceMap
Definition TargetInfo.h:260
const char * UserLabelPrefix
Definition TargetInfo.h:255
bool HasMicrosoftRecordLayout
Definition TargetInfo.h:295
unsigned getUnsignedFractScale() const
getUnsignedFractScale - Return the number of fractional bits in a 'unsigned _Fract' type.
Definition TargetInfo.h:665
virtual bool checkCFBranchLabelSchemeSupported(const CFBranchLabelSchemeKind Scheme, DiagnosticsEngine &Diags) const
unsigned getLongAlign() const
Definition TargetInfo.h:537
virtual IntType getLeastIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return the smallest integer type with at least the specified width.
unsigned getLongLongAlign() const
Definition TargetInfo.h:542
virtual bool hasFeatureEnabled(const llvm::StringMap< bool > &Features, StringRef Name) const
Check if target has a given feature enabled.
virtual CFBranchLabelSchemeKind getDefaultCFBranchLabelScheme() const
Get the target default CFBranchLabelScheme scheme.
unsigned char RegParmMax
Definition TargetInfo.h:257
virtual ArrayRef< const char * > getGCCRegNames() const =0
unsigned getTypeWidth(IntType T) const
Return the width (in bits) of the specified integer type enum.
virtual bool emitVectorDeletingDtors(const LangOptions &) const
Controls whether to emit MSVC vector deleting destructors.
unsigned getLongFractScale() const
getLongFractScale - Return the number of fractional bits in a 'signed long _Fract' type.
Definition TargetInfo.h:654
static bool isTypeSigned(IntType T)
Returns true if the type is signed; false otherwise.
std::optional< unsigned > MaxBitIntWidth
Definition TargetInfo.h:291
virtual void setFeatureEnabled(llvm::StringMap< bool > &Features, StringRef Name, bool Enabled) const
Enable or disable a specific target feature; the feature name must be valid.
unsigned getAccumIBits() const
Definition TargetInfo.h:603
virtual CallingConvKind getCallingConvKind(bool ClangABICompat4) const
std::string simplifyConstraint(StringRef Constraint, SmallVectorImpl< ConstraintInfo > *OutCons=nullptr) const
VersionTuple PlatformMinVersion
Definition TargetInfo.h:263
unsigned getIntWidth() const
getIntWidth/Align - Return the size of 'signed int' and 'unsigned int' for this target,...
Definition TargetInfo.h:531
const char * MCountName
Definition TargetInfo.h:256
unsigned getShortAccumIBits() const
Definition TargetInfo.h:596
unsigned getFloatWidth() const
getFloatWidth/Align/Format - Return the size/align/format of 'float'.
Definition TargetInfo.h:792
virtual ArrayRef< GCCRegAlias > getGCCRegAliases() const =0
StringRef getNormalizedGCCRegisterName(StringRef Name, bool ReturnCanonical=false) const
Returns the "normalized" GCC register name.
unsigned getLongAccumIBits() const
Definition TargetInfo.h:608
FloatModeKind getRealTypeByWidth(unsigned BitWidth, FloatModeKind ExplicitType) const
Return floating point type with specified width.
virtual IntType getIntTypeByWidth(unsigned BitWidth, bool IsSigned) const
Return integer type with specified width.
unsigned getHalfWidth() const
getHalfWidth/Align/Format - Return the size/align/format of 'half'.
Definition TargetInfo.h:787
unsigned char SSERegParmMax
Definition TargetInfo.h:257
unsigned HasUnalignedAccess
Definition TargetInfo.h:285
virtual void adjust(DiagnosticsEngine &Diags, LangOptions &Opts, const TargetInfo *Aux)
Set forced language options.
unsigned char MaxAtomicPromoteWidth
Definition TargetInfo.h:253
virtual LangAS getOpenCLTypeAddrSpace(OpenCLTypeKind TK) const
Get address space for OpenCL type.
static const char * getTypeName(IntType T)
Return the user string for the specified integer type enum.
unsigned getCharAlign() const
Definition TargetInfo.h:522
unsigned RealTypeUsesObjCFPRetMask
Definition TargetInfo.h:268
unsigned MaxOpenCLWorkGroupSize
Definition TargetInfo.h:289
unsigned getLongLongWidth() const
getLongLongWidth/Align - Return the size of 'signed long long' and 'unsigned long long' for this targ...
Definition TargetInfo.h:541
virtual bool validateAsmConstraint(const char *&Name, TargetInfo::ConstraintInfo &info) const =0
llvm::StringMap< bool > & getSupportedOpenCLOpts()
Get supported OpenCL extensions and optional core features.
StringRef PlatformName
Definition TargetInfo.h:262
bool UseAddrSpaceMapMangling
Specify if mangling based on address space map should be used or not for language specific address sp...
Definition TargetInfo.h:386
void resetDataLayout()
Set the data layout based on current triple and ABI.
virtual void setDependentOpenCLOpts()
Set features that depend on other features.
unsigned ComplexLongDoubleUsesFP2Ret
Definition TargetInfo.h:270
virtual bool hasIbm128Type() const
Determine whether the __ibm128 type is supported on this target.
Definition TargetInfo.h:733
unsigned getUnsignedShortAccumIBits() const
Definition TargetInfo.h:617
std::string DataLayoutString
Definition TargetInfo.h:254
unsigned getUnsignedLongAccumScale() const
getUnsignedLongAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned long _...
Definition TargetInfo.h:635
virtual bool hasFloat128Type() const
Determine whether the __float128 type is supported on this target.
Definition TargetInfo.h:718
unsigned getUnsignedLongAccumIBits() const
Definition TargetInfo.h:638
unsigned getUnsignedShortFractScale() const
getUnsignedShortFractScale - Return the number of fractional bits in a 'unsigned short _Fract' type.
Definition TargetInfo.h:658
unsigned HasAlignMac68kSupport
Definition TargetInfo.h:266
const llvm::fltSemantics & getLongDoubleFormat() const
Definition TargetInfo.h:810
bool validateOutputConstraint(ConstraintInfo &Info) const
TargetCXXABI getCXXABI() const
Get the C++ ABI currently in use.
const char * getTypeConstantSuffix(IntType T) const
Return the constant suffix for the specified integer type enum.
unsigned getDoubleWidth() const
getDoubleWidth/Align/Format - Return the size/align/format of 'double'.
Definition TargetInfo.h:802
virtual bool checkArithmeticFenceSupported() const
Controls if __arithmetic_fence is supported in the targeted backend.
virtual StringRef getABI() const
Get the ABI currently in use.
unsigned HasAArch64ACLETypes
Definition TargetInfo.h:276
bool isValidClobber(StringRef Name) const
Returns whether the passed in string is a valid clobber in an inline asm statement.
virtual bool areDefaultedSMFStillPOD(const LangOptions &) const
Controls whether explicitly defaulted (= default) special member functions disqualify something from ...
unsigned getCharWidth() const
Definition TargetInfo.h:521
unsigned HasRISCVVTypes
Definition TargetInfo.h:279
virtual ParsedTargetAttr parseTargetAttr(StringRef Str) const
unsigned getLongWidth() const
getLongWidth/Align - Return the size of 'signed long' and 'unsigned long' for this target,...
Definition TargetInfo.h:536
unsigned getFractScale() const
getFractScale - Return the number of fractional bits in a 'signed _Fract' type.
Definition TargetInfo.h:650
virtual bool initFeatureMap(llvm::StringMap< bool > &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector< std::string > &FeatureVec) const
Initialize the map with the default set of target features for the CPU this should include all legal ...
virtual bool checkCFProtectionBranchSupported(DiagnosticsEngine &Diags) const
Check if the target supports CFProtection branch.
virtual std::string convertConstraint(const char *&Constraint) const
unsigned char MaxAtomicInlineWidth
Definition TargetInfo.h:253
unsigned AllowAMDGPUUnsafeFPAtomics
Definition TargetInfo.h:282
unsigned getShortFractScale() const
getShortFractScale - Return the number of fractional bits in a 'signed short _Fract' type.
Definition TargetInfo.h:646
virtual uint64_t getMaxPointerWidth() const
Return the maximum width of pointers on this target.
Definition TargetInfo.h:500
TargetCXXABI TheCXXABI
Definition TargetInfo.h:258
unsigned ARMCDECoprocMask
Definition TargetInfo.h:287
static const char * getTypeFormatModifier(IntType T)
Return the printf format modifier for the specified integer type enum.
unsigned getUnsignedShortAccumScale() const
getUnsignedShortAccumScale/IBits - Return the number of fractional/integral bits in a 'unsigned short...
Definition TargetInfo.h:614
unsigned HasBuiltinMSVaList
Definition TargetInfo.h:273
unsigned getTypeAlign(IntType T) const
Return the alignment (in bits) of the specified integer type enum.
unsigned getShortAlign() const
Definition TargetInfo.h:527
virtual bool callGlobalDeleteInDeletingDtor(const LangOptions &) const
Controls whether global operator delete is called by the deleting destructor or at the point where de...
virtual bool isValidGCCRegisterName(StringRef Name) const
Returns whether the passed in string is a valid register name according to GCC.
Defines the clang::TargetInfo interface.
The JSON file list parser is used to communicate input to InstallAPI.
if(T->getSizeExpr()) TRY_TO(TraverseStmt(const_cast< Expr * >(T -> getSizeExpr())))
OpenCLTypeKind
OpenCL type kinds.
Definition TargetInfo.h:213
@ OCLTK_Image
Definition TargetInfo.h:217
@ OCLTK_Sampler
Definition TargetInfo.h:221
@ OCLTK_Pipe
Definition TargetInfo.h:218
@ Result
The result type of a method or function.
Definition TypeBase.h:905
LLVM_READONLY bool isDigit(unsigned char c)
Return true if this character is an ASCII digit: [0-9].
Definition CharInfo.h:114
LangAS
Defines the address space values used by the address space qualifier of QualType.
static const char * getCFBranchLabelSchemeFlagVal(const CFBranchLabelSchemeKind Scheme)
FloatModeKind
Definition TargetInfo.h:75
unsigned[(unsigned) LangAS::FirstTargetAddressSpace] LangASMap
The type of a lookup table which maps from language-specific address spaces to target-specific ones.
Contains information gathered from parsing the contents of TargetAttr.
Definition TargetInfo.h:60
const std::string & getConstraintStr() const
void setTiedOperand(unsigned N, ConstraintInfo &Output)
Indicate that this is an input operand that is tied to the specified output operand.
bool hasTiedOperand() const
Return true if this input operand is a matching constraint that ties it to an output operand.
void setRequiresImmediate(int Min, int Max)
Fields controlling how types are laid out in memory; these may need to be copied for targets like AMD...
Definition TargetInfo.h:89
const llvm::fltSemantics * DoubleFormat
Definition TargetInfo.h:144
unsigned UseZeroLengthBitfieldAlignment
Whether zero length bitfields (e.g., int : 0;) force alignment of the next bitfield.
Definition TargetInfo.h:188
unsigned UseExplicitBitFieldAlignment
Whether explicit bit field alignment attributes are honored.
Definition TargetInfo.h:197
IntType
===-— Target Data Type Query Methods ----------------------------—===//
Definition TargetInfo.h:147
const llvm::fltSemantics * LongDoubleFormat
Definition TargetInfo.h:144
unsigned ZeroLengthBitfieldBoundary
If non-zero, specifies a fixed alignment value for bitfields that follow zero length bitfield,...
Definition TargetInfo.h:201
const llvm::fltSemantics * Float128Format
Definition TargetInfo.h:144
unsigned LargestOverSizedBitfieldContainer
The largest container size which should be used for an over-sized bitfield, in bits.
Definition TargetInfo.h:205
unsigned UseLeadingZeroLengthBitfield
Whether zero length bitfield alignment is respected if they are the leading members.
Definition TargetInfo.h:193
unsigned UseBitFieldTypeAlignment
Control whether the alignment of bit-field types is respected when laying out structures.
Definition TargetInfo.h:179
unsigned MaxAlignedAttribute
If non-zero, specifies a maximum alignment to truncate alignment specified in the aligned attribute o...
Definition TargetInfo.h:209
const llvm::fltSemantics * Ibm128Format
Definition TargetInfo.h:144
const llvm::fltSemantics * FloatFormat
Definition TargetInfo.h:143
const llvm::fltSemantics * HalfFormat
Definition TargetInfo.h:143
unsigned UseSignedCharForObjCBool
Whether Objective-C's built-in boolean type should be signed char.
Definition TargetInfo.h:171
unsigned char DefaultAlignForAttributeAligned
Definition TargetInfo.h:134