summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/TargetInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for llvm api change.Rafael Espindola2014-05-161-1/+1
| | | | | | | | | | Now that llvm cannot represent alias cycles, we have to diagnose erros just before trying to close the cycle. This degrades the errors a bit. The real solution is what it was before: if we want to provide good errors for these cases, we have to be able to find a clang level decl given a mangled name and produce the error from Sema. llvm-svn: 209008
* Update for llvm API change.Rafael Espindola2014-05-161-3/+3
| | | | llvm-svn: 208984
* Push record return type classification into CGCXXABIReid Kleckner2014-05-131-102/+43
| | | | | | | | | | | | In the Microsoft C++ ABI, instance methods always return records indirectly via the second hidden parameter. This was implemented in X86_32ABIInfo, but not WinX86_64ABIInfo. Rather than exposing a handful of boolean methods in the CGCXXABI interface, we can expose a single method that applies C++ ABI return value classification rules. llvm-svn: 208733
* MS ABI: Pass 'sret' as the second parameter of instance methodsReid Kleckner2014-05-091-6/+14
| | | | | | | | | | | | | | | | | Summary: MSVC always passes 'sret' after 'this', unlike GCC. This required changing a number of places in Clang that assumed the sret parameter was always first in LLVM IR. This fixes win64 MSVC ABI compatibility for methods returning structs. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3618 llvm-svn: 208458
* Reapply r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-091-19/+6
| | | | | | registers'). Bots are now pacified. llvm-svn: 208425
* Revert r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-091-6/+19
| | | | | | registers'). This is a followon commit from r208413 which broke the LLVM bots. llvm-svn: 208422
* ARM: HFAs must be passed in consecutive registersOliver Stannard2014-05-091-19/+6
| | | | | | | This is the clang counterpart to 208413, which ensures that Homogeneous Floating-point Aggregates are passed in consecutive registers on ARM. llvm-svn: 208417
* Replace virtual with override.Rafael Espindola2014-05-081-2/+2
| | | | llvm-svn: 208324
* [ARM64-BE] Correctly deal with single element HFAs in varargs.James Molloy2014-05-071-2/+4
| | | | | | | Just because the first "if" didn't fire, doesn't mean we can not have an HFA in the "else" clause. llvm-svn: 208216
* ARM: Fix assertion caused by passing bitfield struct using ↵Oliver Stannard2014-05-071-1/+2
| | | | | | | | | | | | ABIArgInfo::getExpandWithPadding In cases where a struct must, according to the AAPCS, not be split between general purpose and floating point registers, we use ABIArgInfo::getExpandWithPadding to add the padding arguments. However, ExpandWithPadding does not work if the struct contains bitfields, so we instead must use ABIArgInfo::getDirect. llvm-svn: 208185
* XCore target: fix initialization bug found by MSan Bot.Robert Lytton2014-05-061-0/+1
| | | | llvm-svn: 208072
* XCore target: Add TypeString meta data to IR output.Robert Lytton2014-05-021-0/+542
| | | | | | | This includes the addition of the virtual function: TargetCodeGenInfo::EmitTargetMD() llvm-svn: 207832
* Remove unused variable that I missed in my rush to fix the botsReid Kleckner2014-05-021-1/+1
| | | | llvm-svn: 207820
* Win64: Use ConvertType instead of checking the MS inheritanceReid Kleckner2014-05-021-12/+5
| | | | | | | | dependent-type-member-pointer.cpp is failing on a win64 bot because -fms-extensions is not enabled. Use ConvertType rather than relying on the inheritance attributes. It's less code, but probably slower. llvm-svn: 207819
* Win64: Pass member pointers larger than 8 bytes by referenceReid Kleckner2014-05-021-6/+23
| | | | | | | | | | | | | The Win64 ABI docs on MSDN say that arguments bigger than 8 bytes are passed by reference. Prior to this change, we were only applying this logic to RecordType arguments. This affects both the Itanium and Microsoft C++ ABIs. Reviewers: majnemer Differential Revision: http://reviews.llvm.org/D3587 llvm-svn: 207817
* [ARM64] Add a missed case label for arm64_be, and enable the aarch64-varargs ↵James Molloy2014-04-231-1/+2
| | | | | | | | test for arm64_be. This ensures that r203917 (cpirker "AArch64_be varargs processing for ARM ABI") is ported to ARM64. llvm-svn: 206961
* ARM64: Do not expand variadic HFA/HVA arguments with the Darwin ABI.Bob Wilson2014-04-211-6/+24
| | | | | | | | | | | Unlike the standard AAPCS64 ABI, variadic arguments are always passed on the stack with the Darwin ABI, and this was not being considered when deciding whether to expand HFA/HVA arguments in a call. An HFA argument with a "float" base type was being expanded into separate "float" arguments, each of which was then extended to a double, resulting in a serious mismatch from what is expected by the va_arg implementation. <rdar://problem/15777067> llvm-svn: 206729
* Fix a comment typo.Bob Wilson2014-04-211-1/+1
| | | | llvm-svn: 206728
* ARM64: make sure the caller is expected to extend in AAPCS.Tim Northover2014-04-181-2/+3
| | | | | | | This is one of those DarwinPCS differences. It'd been caught in arguments, but not return values. llvm-svn: 206594
* ARM64: make sure HFAs on the stack get properly aligned.Tim Northover2014-04-181-7/+8
| | | | | | Another AAPCS bug, part of PR19432. llvm-svn: 206580
* ARM64: remove holes from *all* HFAs on the stack.Tim Northover2014-04-171-13/+15
| | | | | | | | | | My first attempt to make sure HFAs were contiguous was in the block dealing with padding registers, which meant it only triggered on the first stack-based HFA. This should extend it to the rest as well. Another part of PR19432. llvm-svn: 206456
* Replace push_back()s by initializer list for shorter and cleaner code.Eli Bendersky2014-04-151-5/+3
| | | | llvm-svn: 206304
* Add support for CUDA __launch_bounds__ attribute to CodeGen.Eli Bendersky2014-04-151-10/+28
| | | | | | | | | | Sema does have a CUDALaunchBoundsAttr, but CodeGen was doing nothing with it. This change translates CUDALaunchBoundsAttr to maxntidx and minctasm metadata, which NVPTX then translates to the correct PTX directives. Patch by Manjunath Kudlur. llvm-svn: 206302
* ARM64: track alignment padding registers on AAPCS targetsTim Northover2014-04-151-1/+9
| | | | | | | | | | This implements clause C.8 of the AAPCS in the front-end, so that Clang accurately knows when the registers run out and it has to insert padding before the stack objects begin. PR19432. llvm-svn: 206296
* inalloca: Pad the struct *after* inserting each argReid Kleckner2014-04-101-9/+7
| | | | | | | This ensures that the overall struct size will be a multiple of 4, as required by the ABI. llvm-svn: 205981
* ARM64: initial clang support commit.Tim Northover2014-03-291-229/+574
| | | | | | | | | | | This adds Clang support for the ARM64 backend. There are definitely still some rough edges, so please bring up any issues you see with this patch. As with the LLVM commit though, we think it'll be more useful for merging with AArch64 from within the tree. llvm-svn: 205100
* Add ARM big endian Target (armeb, thumbeb)Christian Pirker2014-03-281-0/+2
| | | | | | Reviewed at http://llvm-reviews.chandlerc.com/D3096 llvm-svn: 205008
* Use the new Windows environment for target detectionSaleem Abdulrasool2014-03-271-6/+12
| | | | | | | | | This follows the LLVM change to canonicalise the Windows target triple spellings. Rather than treating each Windows environment as a single entity, the environments are now modelled properly as an environment. This is a mechanical change to convert the triple use to reflect that change. llvm-svn: 204978
* [C++11] Replacing CGFunctionInfo arg iterators with iterator_range ↵Aaron Ballman2014-03-171-41/+29
| | | | | | arguments(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 204068
* AArch64_be varargs processing for ARM ABIChristian Pirker2014-03-141-4/+33
| | | | llvm-svn: 203917
* [C++11] Replacing CXXRecordDecl iterators bases_begin() and bases_end() with ↵Aaron Ballman2014-03-131-23/+17
| | | | | | iterator_range bases(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203803
* ARM: Correct alignment of structs passed as byval pointerOliver Stannard2014-03-121-1/+1
| | | | | | | | | | When a struct has bitfields overlapping with other members (as required by the AAPCS), clang uses a packed struct to represent this. If such a struct is large enough for clang to pass it as a byval pointer (>64 bytes), we need to set the alignment of the argument to match the original type. llvm-svn: 203660
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-121-90/+91
| | | | | | class. llvm-svn: 203643
* [C++11] Replacing RecordDecl iterators field_begin() and field_end() with ↵Aaron Ballman2014-03-081-23/+8
| | | | | | iterator_range fields(). Updating all of the usages of the iterators with range-based for loops. llvm-svn: 203355
* correct consitency of XCore capsRobert Lytton2014-03-031-4/+4
| | | | llvm-svn: 202711
* Add AArch64 big endian Target (aarch64_be)Christian Pirker2014-02-251-0/+1
| | | | llvm-svn: 202151
* MS ABI: Return sret parameters when using inallocaReid Kleckner2014-02-251-0/+2
| | | | | | | | Previously the X86 backend would look for the sret attribute and handle this for us. inalloca takes that all away, so we have to do the return ourselves now. llvm-svn: 202097
* Implement getDwarfEHStackPointer() and initDwarfEHRegSizeTable() for sparcv9.Roman Divacky2014-02-241-0/+41
| | | | llvm-svn: 202059
* AAPCS: Do not split structs after CPRC allocated on stackOliver Stannard2014-02-111-43/+130
| | | | | | | | | | According to the AAPCS, we can split structs between GPRs and the stack, except for when an argument has already been allocated on the stack. This can occur when a large number of floating-point arguments fill up the VFP registers, and are alllocated on the stack before the general-purpose argument registers are full. llvm-svn: 201137
* Fix AAPCS compliance for HFAs containing doubles and long doublesOliver Stannard2014-02-071-4/+23
| | | | | | | | | An HFA is defined as a struct containing floating point values of the same machine type. In the 32-bit ABI, double and long double have the same machine type, so a struct with a mixture of these types must be an HFA (assuming it meets the other criteria). llvm-svn: 200971
* [ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objectsReid Kleckner2014-02-011-12/+109
| | | | | | | | | | | | | | | | | | | When a non-trivial parameter is present, clang now gathers up all the parameters that lack inreg and puts them into a packed struct. MSVC always aligns each parameter to 4 bytes and no more, so this is a pretty simple struct to lay out. On win64, non-trivial records are passed indirectly. Prior to this change, clang was incorrectly using byval on win64. I'm able to self-host a working clang with this change and additional LLVM patches. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2636 llvm-svn: 200597
* [ms-cxxabi] Use x86_cdeclmethodcc for __cdecl methods on win32Reid Kleckner2014-01-311-17/+22
| | | | | | | | | | | | | | | | | | | This fixes PR15768, where the sret parameter and the 'this' parameter are in the wrong order. Instance methods compiled by MSVC never return records in registers, they always return indirectly through an sret pointer. That sret pointer always comes after the 'this' parameter, for both __cdecl and __thiscall methods. Unfortunately, the same is true for other calling conventions, so we'll have to change the overall approach here relatively soon. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2664 llvm-svn: 200587
* [ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.Amara Emerson2014-01-281-8/+10
| | | | | | | | | Arguments and return values must always be marshalled as for the base AAPCS when the callee is a variadic function. Patch by Oliver Stannard! llvm-svn: 200307
* Refactor ABI argument lowering a littleReid Kleckner2014-01-181-57/+60
| | | | | | | | | Currently it tracks the number of free registers, but soon it will track stack offsets for inalloca lowering. No functional change. llvm-svn: 199532
* SPARC passes non-trivial C++ objects indirectly like everybody else.Jakob Stoklund Olesen2014-01-121-0/+5
| | | | llvm-svn: 199037
* Hosting a call to getAttr so that we don't call it multiple times for the ↵Aaron Ballman2013-12-191-9/+5
| | | | | | same attribute. Also removes a hasAttr that's not required. No functional changes intended. llvm-svn: 197675
* Replacing calls to getAttr with calls to hasAttr for clarity. No functional ↵Aaron Ballman2013-12-191-1/+1
| | | | | | change intended -- this only replaces Boolean uses of getAttr. llvm-svn: 197648
* Support EABIHF environment on ARM.Joerg Sonnenberger2013-12-161-1/+12
| | | | llvm-svn: 197406
* GNUEABIHF is the same as GNUEABI for anything not float/double related,Joerg Sonnenberger2013-12-161-0/+1
| | | | | | so use the same exception size as GNUEABI does. llvm-svn: 197404
* Replace use of Triple::getEnvironmentName with the simplerJoerg Sonnenberger2013-12-121-4/+9
| | | | | | Triple::getEnvironment. llvm-svn: 197181
OpenPOWER on IntegriCloud