aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/TargetInfo.cpp
AgeCommit message (Collapse)AuthorFilesLines
2021-04-10[clang][AVR] Support variable decorator '__flash'Ben Shi1-0/+13
Reviewed By: Anastasia Differential Revision: https://reviews.llvm.org/D96853
2021-04-09RISCVABIInfo::classifyArgumentType: Fix static analyzer warnings with ↵Soumi Manna1-2/+2
uninitialized variables warnings - NFCI Differential Revision: https://reviews.llvm.org/D100172
2021-03-15[SystemZ] Test for isinf and isfinite in testFPKind().Jonas Paulsson1-0/+12
Recognize BI__builtin_isinf and BI__builtin_isfinite (and a few other opcodes for finite) in testFPKind() and handle with TDC. Review: Ulrich Weigand. Differential Revision: https://reviews.llvm.org/D97901
2021-03-12[OpaquePtrs] Remove some uses of type-less CreateGEP() (NFC)Nikita Popov1-3/+3
This removes some (but not all) uses of type-less CreateGEP() and CreateInBoundsGEP() APIs, which are incompatible with opaque pointers. There are a still a number of tricky uses left, as well as many more variation APIs for CreateGEP.
2021-03-08[cfe][M68k](7/8) Clang basic supportMin-Yih Hsu1-0/+39
This is the first patch supporting M68k in Clang - Register M68k as a target - Target specific CodeGen support - Target specific attribute support Authors: myhsu, m4yers, glaubitz Differential Revision: https://reviews.llvm.org/D88393
2021-03-01[PowerPC][AIX] Enable passing vectors in variadic functions.Sean Fertile1-4/+0
Differential Revision: https://reviews.llvm.org/D97474
2021-02-18[CFE, SystemZ] New target hook testFPKind() for checks of FP values.Jonas Paulsson1-1/+32
The recent commit 00a6254 "Stop traping on sNaN in builtin_isnan" changed the lowering in constrained FP mode of builtin_isnan from an FP comparison to integer operations to avoid trapping. SystemZ has a special instruction "Test Data Class" which is the preferred way to do this check. This patch adds a new target hook "testFPKind()" that lets SystemZ emit the s390_tdc intrinsic instead. testFPKind() takes the BuiltinID as an argument and is expected to soon handle more opcodes than just 'builtin_isnan'. Review: Thomas Preud'homme, Ulrich Weigand Differential Revision: https://reviews.llvm.org/D96568
2021-02-12Relands "[HIP] Change default --gpu-max-threads-per-block value to 1024"Yaxun (Sam) Liu1-2/+6
This reverts commit e384e94fbe7c1d5c89fcdde33ffda04e9802c2ce.
2021-01-23[PowerPC] Fix va_arg in C++, Objective-C on 32-bit ELF targetsGeorge Koehler1-3/+2
In the PPC32 SVR4 ABI, a va_list has copies of registers from the function call. va_arg looked in the wrong registers for (the pointer representation of) an object in Objective-C, and for some types in C++. Fix va_arg to look in the general-purpose registers, not the floating-point registers. Also fix va_arg for some C++ types, like a member function pointer, that are aggregates for the ABI. Anthony Richardby found the problem in Objective-C. Eli Friedman suggested part of this fix. Fixes https://bugs.llvm.org/show_bug.cgi?id=47921 Reviewed By: efriedma, nemanjai Differential Revision: https://reviews.llvm.org/D90329
2021-01-12[clang][aarch64] Precondition isHomogeneousAggregate on isCXX14AggregateDavid Truby1-1/+5
MSVC on WoA64 includes isCXX14Aggregate in its definition. This is de-facto specification on that platform, so match msvc's behaviour. Fixes: https://bugs.llvm.org/show_bug.cgi?id=47611 Co-authored-by: Peter Waller <peter.waller@arm.com> Differential Revision: https://reviews.llvm.org/D92751
2021-01-07Simplify vectorcall argument classification of HVAs, NFCReid Kleckner1-42/+20
This reduces the number of `WinX86_64ABIInfo::classify` call sites from 3 to 1. The call sites were similar, but passed different values for FreeSSERegs. Use variables instead of `if`s to manage that argument.
2021-01-02[PowerPC] Support powerpcle target in Clang [3/5]Brandon Bergren1-1/+8
Add powerpcle support to clang. For FreeBSD, assume a freestanding environment for now, as we only need it in the first place to build loader, which runs in the OpenFirmware environment instead of the FreeBSD environment. For Linux, recognize glibc and musl environments to match current usage in Void Linux PPC. Adjust driver to match current binutils behavior regarding machine naming. Adjust and expand tests. Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D93919
2020-12-16Use basic_string::find(char) instead of basic_string::find(const char *s, ↵Fangrui Song1-1/+1
size_type pos=0) Many (StringRef) cannot be detected by clang-tidy performance-faster-string-find.
2020-12-14clang: Add byval on x86_intrcc parameter 0Matt Arsenault1-12/+23
This will allow removing the special case treatment of the parameter and avoid depending on the pointer's element type.
2020-12-12Create SPIRABIInfo to enable SPIR_FUNC calling convention.Melanie Blower1-3/+18
Background: Call to library arithmetic functions for div is emitted by the compiler and it set wrong “C” calling convention for calls to these functions, whereas library functions are declared with `spir_function` calling convention. InstCombine optimization replaces such calls with “unreachable” instruction. It looks like clang lacks SPIRABIInfo class which should specify default calling conventions for “system” function calls. SPIR supports only SPIR_FUNC and SPIR_KERNEL calling convention. Reviewers: Erich Keane, Anastasia Differential Revision: https://reviews.llvm.org/D92721
2020-12-08[Clang][CodeGen][RISCV] Fix hard float ABI for struct with empty struct and ↵Luís Marques1-1/+0
complex Fixes bug 44904. Differential Revision: https://reviews.llvm.org/D91278
2020-12-08[Clang][CodeGen][RISCV] Fix hard float ABI test cases with empty structLuís Marques1-5/+5
The code seemed not to account for the field 1 offset. Differential Revision: https://reviews.llvm.org/D91270
2020-12-07[PowerPC][Clang] Remove QPX supportJinsong Ji1-63/+17
Clean up QPX code in clang missed in https://reviews.llvm.org/D83915 Reviewed By: #powerpc, steven.zhang Differential Revision: https://reviews.llvm.org/D92329
2020-12-02[Clang] Don't adjust align for IBM extended doubleQiu Chaofan1-4/+6
Commit 6b1341eb fixed alignment for 128-bit FP types on PowerPC. However, the quadword alignment adjustment shouldn't be applied to IBM extended double (ppc_fp128 in IR) values. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D92278
2020-11-27[AIX] Enabling vector type arguments and return for AIXZarko Todorovski1-4/+5
This patch enables vector type arguments on AIX. All non-aggregate Altivec vector types are 16bytes in size and are 16byte aligned. Reviewed By: Xiangling_L Differential Revision: https://reviews.llvm.org/D92117
2020-11-25TargetInfo.cpp - use castAs<> instead of getAs<> as we dereference the ↵Simon Pilgrim1-1/+1
pointer directly. NFCI. castAs<> will assert the correct cast type instead of just returning null, which we then try to dereference immediately.
2020-11-19[PowerPC] [Clang] Fix alignment of 128-bit float typesQiu Chaofan1-0/+5
According to ELF v2 ABI, both IEEE 128-bit and IBM extended floating point variables should be quad-word (16 bytes) aligned. Previously, only vector types are considered aligned as quad-word on PowerPC. This patch will fix incorrectness of IEEE 128-bit float argument in va_arg cases. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D91596
2020-11-16[AMDGPU] Add option -munsafe-fp-atomicsYaxun (Sam) Liu1-0/+3
Add an option -munsafe-fp-atomics for AMDGPU target. When enabled, clang adds function attribute "amdgpu-unsafe-fp-atomics" to any functions for amdgpu target. This allows amdgpu backend to use unsafe fp atomic instructions in these functions. Differential Revision: https://reviews.llvm.org/D91546
2020-11-12[hip] Remove the coercion on aggregate kernel arguments.Michael Liao1-27/+1
- If an aggregate argument is indirectly accessed within kernels, direct passing results in unpromotable `alloca`, which degrade performance significantly. InferAddrSpace pass is enhanced in [D91121](https://reviews.llvm.org/D91121) to take the assumption that generic pointers loaded from the constant memory could be regarded global ones. The need for the coercion on aggregate arguments is mitigated. Differential Revision: https://reviews.llvm.org/D89980
2020-10-30[SVE] Add fatal error for unnamed SVE variadic argumentsDavid Sherwood1-0/+5
We don't currently support passing unnamed variadic SVE arguments so I've added a fatal error if we hit such cases to prevent any silent ABI issues in future. Differential Revision: https://reviews.llvm.org/D90230
2020-10-19Add option to use older clang ABI behavior when passing certain union types ↵Douglas Yung1-1/+5
as function arguments Recently commit D78699 (commit 26cfb6e562f1), fixed clang's behavior with respect to passing a union type through a register to correctly follow the ABI. However, this is an ABI breaking change with earlier versions of the clang compiler, so we should add an -fclang-abi-compat option to address this. Additionally, the PS4 ABI requires the older behavior, so that is added as well. This change adds a Ver11 value to the ClangABI enum that when it is set (or the target is the PS4 triple), we skip the ABI fix introduced in D78699. Differential Revision: https://reviews.llvm.org/D89747
2020-10-15Revert "[HIP] Change default --gpu-max-threads-per-block value to 1024"Yaxun (Sam) Liu1-6/+2
This reverts commit 187658b8a6112446d9e7797d495bc7542ac83905 due to AMDGPU backend issues.
2020-10-13[AST] Change return type of getTypeInfoInChars to a proper struct instead of ↵Bevin Hansson1-34/+32
std::pair. Followup to D85191. This changes getTypeInfoInChars to return a TypeInfoChars struct instead of a std::pair of CharUnits. This lets the interface match getTypeInfo more closely. Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D86447
2020-10-09[X86] Passing union type through registerLiu, Chen31-6/+10
For example: union M256 { double d; __m256 m; }; extern void foo1(union M256 A); union M256 m1; void test() { foo1(m1); } clang will pass m1 through stack which does not follow the ABI. Differential Revision: https://reviews.llvm.org/D78699
2020-09-30[FE] Use preferred alignment instead of ABI alignment for complete object ↵Xiangling Liao1-4/+0
when applicable On some targets, preferred alignment is larger than ABI alignment in some cases. For example, on AIX we have special power alignment rules which would cause that. Previously, to support those cases, we added a “PreferredAlignment” field in the `RecordLayout` to store the AIX special alignment values in “PreferredAlignment” as the community suggested. However, that patch alone is not enough. There are places in the Clang where `PreferredAlignment` should have been used instead of ABI-specified alignment. This patch is aimed at fixing those spots. Differential Revision: https://reviews.llvm.org/D86790
2020-09-28Recommit "[HIP] Change default --gpu-max-threads-per-block value to 1024"Yaxun (Sam) Liu1-2/+6
Recommit 04abbb3a78186aa92809866b43217c32cba90b71
2020-09-25[PPC] [AIX] Implement calling convention IR for C99 complex types on AIXChris Bowler1-4/+5
Add AIX calling convention logic to Clang for C99 complex types on AIX Differential Revision: https://reviews.llvm.org/D88130
2020-09-25[AArch64] PAC/BTI code generation for LLVM generated functionsMomchil Velikov1-26/+19
PAC/BTI-related codegen in the AArch64 backend is controlled by a set of LLVM IR function attributes, added to the function by Clang, based on command-line options and GCC-style function attributes. However, functions, generated in the LLVM middle end (for example, asan.module.ctor or __llvm_gcov_write_out) do not get any attributes and the backend incorrectly does not do any PAC/BTI code generation. This patch record the default state of PAC/BTI codegen in a set of LLVM IR module-level attributes, based on command-line options: * "sign-return-address", with non-zero value means generate code to sign return addresses (PAC-RET), zero value means disable PAC-RET. * "sign-return-address-all", with non-zero value means enable PAC-RET for all functions, zero value means enable PAC-RET only for functions, which spill LR. * "sign-return-address-with-bkey", with non-zero value means use B-key for signing, zero value mean use A-key. This set of attributes are always added for AArch64 targets (as opposed, for example, to interpreting a missing attribute as having a value 0) in order to be able to check for conflicts when combining module attributed during LTO. Module-level attributes are overridden by function level attributes. All the decision making about whether to not to generate PAC and/or BTI code is factored out into AArch64FunctionInfo, there shouldn't be any places left, other than AArch64FunctionInfo, which directly examine PAC/BTI attributes, except AArch64AsmPrinter.cpp, which is/will-be handled by a separate patch. Differential Revision: https://reviews.llvm.org/D85649
2020-09-11[clang][aarch64] Fix ILP32 ABI for arm_sve_vector_bitsCullen Rhodes1-1/+1
The element types of scalable vectors are defined in terms of stdint types in the ACLE. This patch fixes the mapping to builtin types for the ILP32 ABI when creating VLS types with the arm_sve_vector_bits, where the mapping is as follows: int32_t -> LongTy int64_t -> LongLongTy uint32_t -> UnsignedLongTy uint64_t -> UnsignedLongLongTy This is implemented by leveraging getBuiltinVectorTypeInfo which is target agnostic since it calls ASTContext::getIntTypeForBitwidth for integer types. The element type for svfloat16_t is changed from Float16Ty to HalfTy when creating VLS types since this is what is used elsewhere. For more information, see: https://github.com/ARM-software/abi-aa/blob/master/aapcs64/aapcs64.rst#types-varying-by-data-model https://github.com/ARM-software/abi-aa/blob/master/aapcs64/aapcs64.rst#appendix-support-for-scalable-vectors Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D87358
2020-09-02Revert "[HIP] Change default --gpu-max-threads-per-block value to 1024"Yaxun (Sam) Liu1-6/+2
Temporarily revert commit 04abbb3a78186aa92809866b43217c32cba90b71 due to regressions in some HIP apps due backend issues revealed by this change. Will re-commit it when backend issues are fixed.
2020-08-28Reland "[CodeGen][AArch64] Support arm_sve_vector_bits attribute"Cullen Rhodes1-23/+100
This relands D85743 with a fix for test CodeGen/attr-arm-sve-vector-bits-call.c that disables the new pass manager with '-fno-experimental-new-pass-manager'. Test was failing due to IR differences with the new pass manager which broke the Fuchsia builder [1]. Reverted in 2e7041f. [1] http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/10375 Original summary: This patch implements codegen for the 'arm_sve_vector_bits' type attribute, defined by the Arm C Language Extensions (ACLE) for SVE [1]. The purpose of this attribute is to define vector-length-specific (VLS) versions of existing vector-length-agnostic (VLA) types. VLSTs are represented as VectorType in the AST and fixed-length vectors in the IR everywhere except in function args/return. Implemented in this patch is codegen support for the following: * Implicit casting between VLA <-> VLS types. * Coercion of VLS types in function args/return. * Mangling of VLS types. Casting is handled by the CK_BitCast operation, which has been extended to support the two new vector kinds for fixed-length SVE predicate and data vectors, where the cast is implemented through memory rather than a bitcast which is unsupported. Implementing this as a normal bitcast would require relaxing checks in LLVM to allow bitcasting between scalable and fixed types. Another option was adding target-specific intrinsics, although codegen support would need to be added for these intrinsics. Given this, casting through memory seemed like the best approach as it's supported today and existing optimisations may remove unnecessary loads/stores, although there is room for improvement here. Coercion of VLSTs in function args/return from fixed to scalable is implemented through the AArch64 ABI in TargetInfo. The VLA and VLS types are defined by the ACLE to map to the same machine-level SVE vectors. VLS types are mangled in the same way as: __SVE_VLS<typename, unsigned> where the first argument is the underlying variable-length type and the second argument is the SVE vector length in bits. For example: #if __ARM_FEATURE_SVE_BITS==512 // Mangled as 9__SVE_VLSIu11__SVInt32_tLj512EE typedef svint32_t vec __attribute__((arm_sve_vector_bits(512))); // Mangled as 9__SVE_VLSIu10__SVBool_tLj512EE typedef svbool_t pred __attribute__((arm_sve_vector_bits(512))); #endif The latest ACLE specification (00bet5) does not contain details of this mangling scheme, it will be specified in the next revision. The mangling scheme is otherwise defined in the appendices to the Procedure Call Standard for the Arm Architecture, see [2] for more information. [1] https://developer.arm.com/documentation/100987/latest [2] https://github.com/ARM-software/abi-aa/blob/master/aapcs64/aapcs64.rst#appendix-c-mangling Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D85743
2020-08-27Revert "[CodeGen][AArch64] Support arm_sve_vector_bits attribute"Cullen Rhodes1-100/+23
Test CodeGen/attr-arm-sve-vector-bits-call.c is failing on some builders [1][2]. Reverting whilst I investigate. [1] http://lab.llvm.org:8011/builders/fuchsia-x86_64-linux/builds/10375 [2] https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8870800848452818112 This reverts commit 42587345a3afc52c03c6e6095db773358a1b03e9.
2020-08-27[CodeGen][AArch64] Support arm_sve_vector_bits attributeCullen Rhodes1-23/+100
This patch implements codegen for the 'arm_sve_vector_bits' type attribute, defined by the Arm C Language Extensions (ACLE) for SVE [1]. The purpose of this attribute is to define vector-length-specific (VLS) versions of existing vector-length-agnostic (VLA) types. VLSTs are represented as VectorType in the AST and fixed-length vectors in the IR everywhere except in function args/return. Implemented in this patch is codegen support for the following: * Implicit casting between VLA <-> VLS types. * Coercion of VLS types in function args/return. * Mangling of VLS types. Casting is handled by the CK_BitCast operation, which has been extended to support the two new vector kinds for fixed-length SVE predicate and data vectors, where the cast is implemented through memory rather than a bitcast which is unsupported. Implementing this as a normal bitcast would require relaxing checks in LLVM to allow bitcasting between scalable and fixed types. Another option was adding target-specific intrinsics, although codegen support would need to be added for these intrinsics. Given this, casting through memory seemed like the best approach as it's supported today and existing optimisations may remove unnecessary loads/stores, although there is room for improvement here. Coercion of VLSTs in function args/return from fixed to scalable is implemented through the AArch64 ABI in TargetInfo. The VLA and VLS types are defined by the ACLE to map to the same machine-level SVE vectors. VLS types are mangled in the same way as: __SVE_VLS<typename, unsigned> where the first argument is the underlying variable-length type and the second argument is the SVE vector length in bits. For example: #if __ARM_FEATURE_SVE_BITS==512 // Mangled as 9__SVE_VLSIu11__SVInt32_tLj512EE typedef svint32_t vec __attribute__((arm_sve_vector_bits(512))); // Mangled as 9__SVE_VLSIu10__SVBool_tLj512EE typedef svbool_t pred __attribute__((arm_sve_vector_bits(512))); #endif The latest ACLE specification (00bet5) does not contain details of this mangling scheme, it will be specified in the next revision. The mangling scheme is otherwise defined in the appendices to the Procedure Call Standard for the Arm Architecture, see [2] for more information. [1] https://developer.arm.com/documentation/100987/latest [2] https://github.com/ARM-software/abi-aa/blob/master/aapcs64/aapcs64.rst#appendix-c-mangling Reviewed By: efriedma Differential Revision: https://reviews.llvm.org/D85743
2020-08-06clang: Use byref for aggregate kernel argumentsMatt Arsenault1-5/+26
Add address space to indirect abi info and use it for kernels. Previously, indirect arguments assumed assumed a stack passed object in the alloca address space using byval. A stack pointer is unsuitable for kernel arguments, which are passed in a separate, constant buffer with a different address space. Start using the new byref for aggregate kernel arguments. Previously these were emitted as raw struct arguments, and turned into loads in the backend. These will lower identically, although with byref you now have the option of applying an explicit alignment. In the future, a reasonable implementation would use byref for all kernel arguments (this would be a practical problem at the moment due to losing things like noalias on pointer arguments). This is mostly to avoid fighting the optimizer's treatment of aggregate load/store. SROA and instcombine both turn aggregate loads and stores into a long sequence of element loads and stores, rather than the optimizable memcpy I would expect in this situation. Now an explicit memcpy will be introduced up-front which is better understood and helps eliminate the alloca in more situations. This skips using byref in the case where HIP kernel pointer arguments in structs are promoted to global pointers. At minimum an additional patch is needed to allow coercion with indirect arguments. This also skips using it for OpenCL due to the current workaround used to support kernels calling kernels. Distinct function bodies would need to be generated up front instead of emitting an illegal call.
2020-08-06[ABI][NFC] Fix the confusion of ByVal and ByRef argument namesAnatoly Trosinenko1-7/+7
The second argument of getNaturalAlignIndirect() was `bool ByRef`, but the implementation was just delegating to getIndirect() with `ByRef` passed unchanged to `bool ByVal` parameter of getIndirect(). Fix a couple of /*ByRef=*/ comments as well. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D85113
2020-08-04[VE] Extend integer arguments and return values smaller than 64 bitsKazushi (Jam) Marukawa1-5/+8
In order to follow NEC Aurora SX VE ABI correctly, change to sign/zero extend integer arguments and return values smaller than 64 bits in clang. Also update regression test. Reviewed By: simoll Differential Revision: https://reviews.llvm.org/D85071
2020-08-03[CodeGen][ObjC] Mark calls to objc_unsafeClaimAutoreleasedReturnValue asAkira Hatanaka1-4/+2
notail on x86-64 This is needed because the epilogue code inserted before tail calls on x86-64 breaks the handshake between the caller and callee. Calls to objc_retainAutoreleasedReturnValue used to have the same problem, which was fixed in https://reviews.llvm.org/D59656. rdar://problem/66029552 Differential Revision: https://reviews.llvm.org/D84540
2020-07-10[ABI] Handle C++20 [[no_unique_address]] attributeUlrich Weigand1-1/+16
Many platform ABIs have special support for passing aggregates that either just contain a single member of floatint-point type, or else a homogeneous set of members of the same floating-point type. When making this determination, any extra "empty" members of the aggregate type will typically be ignored. However, in C++ (at least in all prior versions), no data member would actually count as empty, even if it's type is an empty record -- it would still be considered to take up at least one byte of space, and therefore make those ABI special cases not apply. This is now changing in C++20, which introduced the [[no_unique_address]] attribute. Members of empty record type, if they also carry this attribute, now do *not* take up any space in the type, and therefore the ABI special cases for single-element or homogeneous aggregates should apply. The C++ Itanium ABI has been updated accordingly, and GCC 10 has added support for this new case. This patch now adds support to LLVM. This is cross-platform; it affects all platforms that use the single-element or homogeneous aggregate ABI special case and implement this using any of the following common subroutines in lib/CodeGen/TargetInfo.cpp: isEmptyField isEmptyRecord isSingleElementStruct isHomogeneousAggregate
2020-07-09[MSP430] Align the _Complex ABI with current msp430-gccAnatoly Trosinenko1-1/+40
Assembler output is checked against msp430-gcc 9.2.0.50 from TI. Reviewed By: asl Differential Revision: https://reviews.llvm.org/D82646
2020-07-07[SystemZ ABI] Allow class types in GetSingleElementTypeUlrich Weigand1-1/+3
The SystemZ ABI specifies that aggregate types with just a single member of floating-point type shall be passed as if they were just a scalar of that type. This applies to both struct and class types (but not unions). However, the current ABI support code in clang only checks this case for struct types, which means that for class types, generated code does not adhere to the platform ABI. Fixed by accepting both struct and class types in the SystemZABIInfo::GetSingleElementType routine.
2020-07-01Implement AVX ABI Warning/errorErich Keane1-0/+103
The x86-64 "avx" feature changes how >128 bit vector types are passed, instead of being passed in separate 128 bit registers, they can be passed in 256 bit registers. "avx512f" does the same thing, except it switches from 256 bit registers to 512 bit registers. The result of both of these is an ABI incompatibility between functions compiled with and without these features. This patch implements a warning/error pair upon an attempt to call a function that would run afoul of this. First, if a function is called that would have its ABI changed, we issue a warning. Second, if said call is made in a situation where the caller and callee are known to have different calling conventions (such as the case of 'target'), we instead issue an error. Differential Revision: https://reviews.llvm.org/D82562
2020-06-24Fix crash on XCore on unused inline in EmitTargetMetadataNigel Perks1-6/+28
EmitTargetMetadata passed to emitTargetMD a null pointer as returned from GetGlobalValue, for an unused inline function which has been removed from the module at that point. A FIXME in CodeGenModule.cpp commented that the calling code in EmitTargetMetadata should be moved into the one target that needs it (XCore). A review comment agreed. So the calling loop has been moved into the XCore subclass. The check for null is done in that loop. Differential Revision: https://reviews.llvm.org/D77068
2020-06-24[VE] Clang toolchain for VEKazushi (Jam) Marukawa1-0/+52
Summary: This patch enables compilation of C code for the VE target with Clang. Differential Revision: https://reviews.llvm.org/D79411
2020-06-18[ARM][bfloat] Do not coerce bfloat arguments and returns to integersTies Stuij1-16/+0
Summary: As part of moving the argument lowering handling for bfloat arguments and returns to the backend, this patch removes the code that was responsible for handling the coercion of those arguments in Clang's Codegen. Subscribers: kristof.beyls, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81837
2020-06-18[ARM][Clang] Removing lowering of half-precision FP arguments and returns ↵Lucas Prates1-22/+0
from Clang's CodeGen Summary: On the process of moving the argument lowering handling for half-precision floating point arguments and returns to the backend, this patch removes the code that was responsible for handling the coercion of those arguments in Clang's Codegen. Reviewers: rjmccall, chill, ostannard, dnsampaio Reviewed By: ostannard Subscribers: stuij, kristof.beyls, dmgreen, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81451