Commit Graph

943 Commits

Author SHA1 Message Date
Ulrich Weigand d85ab2e6f3 Implement target-specific __attribute__((aligned)) value
The GCC construct __attribute__((aligned)) is defined to set alignment
to "the default alignment for the target architecture" according to
the GCC documentation:

  The default alignment is sufficient for all scalar types, but may not be
  enough for all vector types on a target that supports vector operations.
  The default alignment is fixed for a particular target ABI.

clang currently hard-coded an alignment of 16 bytes for that construct,
which is correct on some platforms (including X86), but wrong on others
(including SystemZ).  Since this value is ABI-relevant, it is important
to get correct for compatibility purposes.

This patch adds a new TargetInfo member "DefaultAlignForAttributeAligned"
that targets can set to the appropriate default __attribute__((aligned))
value.

Note that I'm deliberately *not* using the existing "SuitableAlign"
value, which is used to set the pre-defined macro __BIGGEST_ALIGNMENT__,
since those two values may not be the same on all platforms.  In fact,
on X86, __attribute__((aligned)) always uses 16-byte alignment, while
__BIGGEST_ALIGNMENT__ may be larger if AVX-2 or AVX-512 are supported.
(This is actually not yet correctly implemented in clang either.)

The patch provides a value for DefaultAlignForAttributeAligned only for
SystemZ, and leaves the default for all other targets at 16, which means
no visible change in behavior on all other targets.  (The value is still
wrong for some other targets, but I'd prefer to leave it to the target
maintainers for those platforms to fix.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235397 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-21 17:29:35 +00:00
Tom Stellard 6ad734ab67 R600: Add GCC reg names
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234892 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 14:36:56 +00:00
Nemanja Ivanovic de900e97bb Add Clang support for -mdirect-move on PPC
This patch corresponds to review:
http://reviews.llvm.org/D8930

This just adds a front end option to let the back end know the target has PPC
direct move instructions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234683 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-11 10:43:36 +00:00
Alexander Kornienko dfa4cf3126 Use 'override/final' instead of 'virtual' for overridden methods
Summary:
The patch is generated using clang-tidy misc-use-override check.

This command was used:

  tools/clang/tools/extra/clang-tidy/tool/run-clang-tidy.py \
    -checks='-*,misc-use-override' -header-filter='llvm|clang' -j=32 -fix

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D8926

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234678 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-11 02:00:23 +00:00
Joerg Sonnenberger ccdd00a6e5 Create the correct profiling symbol on NetBSD.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234636 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-10 21:02:53 +00:00
Joerg Sonnenberger ce7a47ad48 Create correct platform-specific target for NetBSD PPC64LE.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234629 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-10 20:53:48 +00:00
Nemanja Ivanovic 1ed200ed06 Add Clang support for remaining integer divide and permute instructions from ISA 2.06
This patch corresponds to review:
http://reviews.llvm.org/D8398

It adds some builtin functions to access the extended divide and bit permute instructions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234547 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-09 23:58:16 +00:00
Javed Absar 16eb22d1df [ARM] add support for Cortex-R4/R4F
Adds ARM Cortex-R4 and R4F support and tests in Clang. Though Cortex-R4
support was present, the support for hwdiv in thumb-mode was not defined
or tested properly. This has also been added.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234488 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-09 14:12:10 +00:00
Eli Bendersky 7ce861f257 Set the type of ptrdiff_t to signed on NVPTX targets
It was unsigned before, which is unlike any other target and also doesn't make
much sense.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233836 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01 20:29:18 +00:00
Eli Bendersky da8b1fb579 Set NVPTX64 target's size_t to match other 64-bit targets
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233830 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01 18:29:27 +00:00
Reid Kleckner 91d4fdb510 Fix data layout mismatch between LLVM and Clang for i686-pc-windows-msvc-elf
Do the same thing as win64. If we're not using COFF, use the ELF
manglings. Maybe if we are targetting *-windows-msvc-macho, we should
use darwin manglings, but I don't need to stir that pot today.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233819 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01 16:45:06 +00:00
Ulrich Weigand a5c0e8fe98 [SystemZ] Add header files to Makefile / module.modulemap
This should fix build-bot failures after r233804.

The patch also adds a "systemz" feature, and renames the
"transactional-execution" feature to "htm", since it turns
out "-" is not a legal character in module feature names.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233807 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01 14:15:35 +00:00
Ulrich Weigand 5f71cb31d8 [SystemZ] Support transactional execution on zEC12
The zEC12 provides the transactional-execution facility.  This is exposed
to users via a set of builtin routines on other compilers.  This patch
adds clang support to enable those builtins.  In partciular, the patch:

- enables the transactional-execution feature by default on zEC12
- allows to override presence of that feature via the -mhtm/-mno-htm options
- adds a predefined macro __HTM__ if the feature is enabled
- adds support for the transactional-execution GCC builtins
- adds Sema checking to verify the __builtin_tabort abort code
- adds the s390intrin.h header file (for GCC compatibility)
- adds s390 sections to the htmintrin.h and htmxlintrin.h header files

Since this is first use of target-specific intrinsics on the platform,
the patch creates the include/clang/Basic/BuiltinsSystemZ.def file and
hooks it up in TargetBuiltins.h and lib/Basic/Targets.cpp.

An associated LLVM patch adds the required LLVM IR intrinsics.

For reference, the transactional-execution instructions are documented
in the z/Architecture Principles of Operation for the zEC12:
http://publibfp.boulder.ibm.com/cgi-bin/bookmgr/download/DZ9ZR009.pdf
The associated builtins are documented in the GCC manual:
http://gcc.gnu.org/onlinedocs/gcc/S_002f390-System-z-Built-in-Functions.html
The htmxlintrin.h intrinsics provided for compatibility with the IBM XL
compiler are documented in the "z/OS XL C/C++ Programming Guide".



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233804 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-01 12:54:25 +00:00
Eli Bendersky f7168d4124 Add sm_37 target to Clang for NVPTX
Support for this target was added in LLVM r233575 and r233583



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233715 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 17:03:16 +00:00
Derek Schuff 1d94133561 Add driver support for Native Client SDK
Add Tool and ToolChain support for clang to target the NaCl OS using the NaCl
SDK for x86-32, x86-64 and ARM.

Includes nacltools::Assemble and Link which are derived from gnutools. They
are similar to Linux but different enought that they warrant their own class.
Also includes a NaCl_TC in ToolChains derived from Generic_ELF with library
and include paths suitable for an SDK and independent of the system tools.

Differential Revision: http://reviews.llvm.org/D8590

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233594 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 20:31:33 +00:00
Ulrich Weigand 975362c0cd [SystemZ] Fix definition of IntMaxType / Int64Type
Like on other 64-bit platforms, Int64Type should be SignedLong
on SystemZ, not SignedLongLong as per default.  This could cause
ABI incompatibilities in certain cases (e.g. name mangling).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233544 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 13:50:21 +00:00
Daniel Sanders 822a5e36ff [mips] Add support for 'ZC' inline assembly memory constraint.
Summary: Also add tests for 'R' and 'm'.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D8449

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233542 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-30 13:47:23 +00:00
Eric Christopher 691b3a0ba6 Make the msse4/mno-sse4 flags aliases of the maximum sse values
they enable/disable.

This fixes two things:

a) sse4 isn't actually a target feature, don't treat it as one.
b) we weren't correctly disabling sse4.1 when we'd pass -mno-sse4
   after enabling it, thus passing preprocessor directives and
   (soon) passing the function attribute as well when we shouldn't.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233223 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25 22:09:26 +00:00
Kit Barton bf6ca3f158 Add Hardware Transactional Memory (HTM) Support
This patch adds Hardware Transaction Memory (HTM) support supported by ISA 2.07
(POWER8). The intrinsic support is based on GCC one [1], with both 'PowerPC HTM
Low Level Built-in Functions' and 'PowerPC HTM High Level Inline Functions'
implemented.

Along with builtins a new driver switch is added to enable/disable HTM
instruction support (-mhtm) and a header with common definitions (mostly to
parse the TFHAR register value). The HTM switch also sets a preprocessor builtin
HTM.

The HTM usage requires a recently newer kernel with PPC HTM enabled. Tested on
powerpc64 and powerpc64le.

This is send along a llvm patch to enabled the builtins and option switch.

[1]
https://gcc.gnu.org/onlinedocs/gcc/PowerPC-Hardware-Transactional-Memory-Built-in-Functions.html

Phabricator Review: http://reviews.llvm.org/D8248


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25 19:41:41 +00:00
Tamas Berghammer 61dc389d93 Create android x86_32 and x86_64 target info
On android x86_32 the long double is only 64 bits (compared to 80 bits
on linux x86_32) and on android x86_64 the long double is IEEEquad
(compared to x87DoubleExtended on linux x86_64). This CL creates new
TargetInfo classes for this targets to represent these differences.

Differential revision: http://reviews.llvm.org/D8357

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233177 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-25 10:38:50 +00:00
Benjamin Kramer 846459b7bc Move private classes into anonymous namespaces
Also merge anonymous namespaces in Targets.cpp a bit. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232945 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-23 12:31:05 +00:00
David Majnemer 1a5d76d8e8 MS ABI: Define _HAS_CHAR16_T_LANGUAGE_SUPPORT when appropriate
If we are in MSVC 2015 compatibility mode and C++11 language conformance
is enabled, define _HAS_CHAR16_T_LANGUAGE_SUPPORT to 1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232615 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-18 07:53:18 +00:00
David Majnemer 38fa1a68d5 Basic: Update clang to reflect changes made to LLVM datalayout
We now give x86-64 COFF targets a different mangling code, update clang
to use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232571 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 23:55:00 +00:00
Renato Golin 5d49667147 [ARM] Add support for ARMV6K subtarget (Clang)
ARMv6K is another layer between ARMV6 and ARMV6T2. This is the Clang
side of the changes.

ARMV6 family LLVM implementation.

+-------------------------------------+
| ARMV6                               |
+----------------+--------------------+
| ARMV6M (thumb) | ARMV6K (arm,thumb) | <- From ARMV6K and ARMV6M processors
+----------------+--------------------+    have support for hint instructions
| ARMV6T2 (arm,thumb,thumb2)          |    (SEV/WFE/WFI/NOP/YIELD). They can
+-------------------------------------+    be either real or default to NOP.
| ARMV7 (arm,thumb,thumb2)            |    The two processors also use
+-------------------------------------+    different encoding for them.

Patch by Vinicius Tinti.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@232469 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-17 11:55:43 +00:00
Joerg Sonnenberger ff77c7dac3 Under duress, move check for target support of __builtin_setjmp/
__builtin_longjmp to Sema as requested by John McCall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231986 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-11 23:46:32 +00:00
Hal Finkel e2b305315b [PowerPC] ABI support for the QPX vector instruction set
Support for the QPX vector instruction set, used on the IBM BG/Q supercomputer,
has recently been added to the LLVM PowerPC backend. This vector instruction
set requires some ABI modifications because the ABI on the BG/Q expects
<4 x double> vectors to be provided with 32-byte stack alignment, and to be
handled as native vector types (similar to how Altivec vectors are handled on
mainline PPC systems). I've named this ABI variant elfv1-qpx, have made this
the default ABI when QPX is supported, and have updated the ABI handling code
to provide QPX vectors with the correct stack alignment and associated
register-assignment logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231960 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-11 19:14:15 +00:00
Ed Schouten dfd3e4e8a8 Add target information for CloudABI on x86-64.
CloudABI can be identified by the __CloudABI__ preprocessor definition. The
system uses ELF executables.

CloudABI uses Unicode 7.0.0 for the encoding of wchar_t. As Unicode 7.0.0 is
synchronized with ISO/IEC 10646:2012 (released on 2012-06-01),
__STDC_ISO_10646__ is defined as 201206L.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231912 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-11 08:42:46 +00:00
Nemanja Ivanovic 76535280fc Add Clang support for PPC cryptography builtins
Review: http://reviews.llvm.org/D7951


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231291 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-04 21:48:22 +00:00
Dan Albert 83a7dd8f4d Support __attribute__((availability)) on Android.
Reviewers: srhines

Reviewed By: srhines

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D7929

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231092 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-03 18:28:38 +00:00
Renato Golin 512a33ebc0 Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind instructions.
Equally to NetBSD, Bitrig will be using .eh_frame unwinding on ARM.

Patch by Patrick Wildt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230763 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27 16:35:48 +00:00
Tom Stellard 150aa85094 AMDGCN: Define cl_khr_fp64 when compiling OpenCL programs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230761 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-27 15:10:19 +00:00
Reid Kleckner 413d8cac1a Win64: Silently ignore __stdcall, __fastcall, and __thiscall
MSVC doesn't warn on this. Users are expected to apply the WINAPI macro
to functions passed by pointer to the Win32 API, and this macro expands
to __stdcall. This means we end up with a lot of useless noisy warnings
about ignored calling conventions when compiling code with clang for
Win64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230668 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 19:43:46 +00:00
Petar Jovanovic 056cc8470b Add support for generating MIPS legacy NaN
Currently, the NaN values emitted for MIPS architectures do not cover
non-IEEE754-2008 compliant case. This change fixes the issue.

Patch by Vladimir Radosavljevic.

Differential Revision: http://reviews.llvm.org/D7882


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230653 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 18:19:22 +00:00
Richard Smith 2f65d8ce60 Remove some unused includes of llvm/IR headers from parts of Clang that really
shouldn't depend on LLVM IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230586 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-26 00:01:03 +00:00
Simon Atanasyan 7dc6740ba8 [Mips] Support mips32r3, mips32r5, mips64r3, mips64r5 MIPS ISA names
The patch teaches the clang's driver to understand new MIPS ISA names,
pass appropriate options to the assembler, defines corresponding macros etc

http://reviews.llvm.org/D7737

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230092 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-20 23:37:40 +00:00
Zoran Jovanovic f4ae8457c4 Change representation of member function pointers for MIPS targets
Differential Revision: http://reviews.llvm.org/D7148


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229680 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18 15:21:35 +00:00
Bradley Smith 10300321f9 [ARM] Add missing M/R class CPUs
Add some of the missing M and R class Cortex CPUs, namely:

Cortex-M0+ (called Cortex-M0plus for GCC compatibility)
Cortex-M1
SC000
SC300
Cortex-R5


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229661 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-18 10:34:48 +00:00
Eric Christopher 211a1ae646 Remove the ABI from the target features. It's obsoleted by
the -target-abi use and those features don't exist anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@229526 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-17 19:51:15 +00:00
Tim Northover a9515c8781 Preprocessor: support __BIGGEST_ALIGNMENT__ macro
For compatibility with GCC (and because it's generally helpful information
otherwise inaccessible to the preprocessor). This appears to be canonically the
alignment of max_align_t (e.g. on i386, __BIGGEST_ALIGNMENT__ is 4 even though
vector types will be given greater alignment).

Patch mostly by Mats Petersson

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228367 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-06 01:25:07 +00:00
Renato Golin 7fc56c94ba Teaches the Clang driver to accept Cortex-A72
A previous commit added Cortex-A72 to LLVM, this teaches Clang to
accept it as well.

Patch by Ranjeet Singh.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@228141 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-04 13:31:56 +00:00
Reid Kleckner b221dc5767 Windows: Fix _CPPUNWIND definition to follow -fcxx-exceptions
This is consistent with how we interpret the MSVC /EH flag, which
controls -fcxx-exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227616 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30 21:42:55 +00:00
Daniel Sanders 8f3cbdeb86 [mips] Pass ABI name via -target-abi instead of target-features
Patch by Vladimir Medic

Reviewers: echristo, atanasyan, dsanders

Reviewed By: atanasyan, dsanders

Subscribers: llvm-commits, echristo, atanasyan

Differential Revision: http://reviews.llvm.org/D6091


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227583 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-30 17:35:23 +00:00
Derek Schuff bf6f6d5f28 Remove support for pnaclcall attribute
Summary:
It was used for interoperability with PNaCl's calling conventions, but
it's no longer needed.

Also Remove NaCl*ABIInfo which just existed to delegate to either the portable
or native ABIInfo, and remove checkCallingConvention which was now a no-op
override.

Reviewers: jvoung

Subscribers: jfb, llvm-commits

Differential Revision: http://reviews.llvm.org/D7206

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227362 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 20:24:52 +00:00
Tom Stellard 5a05b97a8e R600: Use a Southern Islands GPU as the default for the amdgcn target
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227315 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-28 15:38:44 +00:00
Alex Rosenberg dea8d33a72 Begin to teach clang about the PS4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227194 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 14:47:44 +00:00
Simon Atanasyan ea1747425f [Mips] Fix type of 64-bit integer in case of MIPS N64 ABI
Differential Revision: http://reviews.llvm.org/D7127

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226877 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-22 23:16:48 +00:00
Alexander Kornienko 4be29ef64d Re-apply "r226548 - Introduce SPIR calling conventions" reverted in r226558.
The test was fixed after a discussion with the revision author: the check
pattern was made more flexible as the "%call" part is not what we actually want
to check strictly there.

The original patch description:
===
Introduce SPIR calling conventions.

This implements Section 3.7 from the SPIR 1.2 spec:

    SPIR kernels should use "spir_kernel" calling convention.
    Non-kernel functions use "spir_func" calling convention. All
    other calling conventions are disallowed.

The patch works only for OpenCL source. Any other uses will need
to ensure that kernels are assigned the spir_kernel calling
convention correctly.
===


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226561 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-20 11:20:41 +00:00
Alexander Kornienko 39b11f7bfd Reverting r226548 as one of the tests fails in some configurations.
Here's the fail log from our internal setup:
===
  .../tools/clang/clang -cc1 -internal-isystem .../tools/clang/staging/include -nostdsysteminc .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl -triple spir-unknown-unknown -emit-llvm -o -
  FileCheck .../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl
.../tools/clang/test/CodeGenOpenCL/spir-calling-conv.cl:11:12: error: expected string not found in input
 // CHECK: %call = tail call spir_func i32 @get_dummy_id(i32 0)
           ^
<stdin>:6:52: note: scanning from here
define spir_kernel void @foo(i32 addrspace(1)* %A) #0 {
                                                   ^
<stdin>:7:2: note: possible intended match here
 %1 = tail call spir_func i32 @get_dummy_id(i32 0) #2
 ^
===

Here's a failure on a public CI server:
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/1183/



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226558 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-20 10:55:33 +00:00
Sameer Sahasrabuddhe 3a9971b5b8 Introduce SPIR calling conventions.
This implements Section 3.7 from the SPIR 1.2 spec:

    SPIR kernels should use "spir_kernel" calling convention.
    Non-kernel functions use "spir_func" calling convention. All
    other calling conventions are disallowed.

The patch works only for OpenCL source. Any other uses will need
to ensure that kernels are assigned the spir_kernel calling
convention correctly.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226548 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-20 06:44:32 +00:00
Tim Northover c6437aa092 AArch64: implement AAPCS layout rules for bit-fields.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@226294 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-16 18:44:04 +00:00