diff options
author | Micah Villmow <villmow@gmail.com> | 2012-10-01 17:01:31 +0000 |
---|---|---|
committer | Micah Villmow <villmow@gmail.com> | 2012-10-01 17:01:31 +0000 |
commit | e53d6051b7e173722351a5647bfd71eebee3d837 (patch) | |
tree | e46bfeb28dfa3dfd21bdd869c7e59468db8ae1b6 /include | |
parent | 31189373056ce12f729333c4dc16d02ad72e8e1f (diff) | |
download | llvm-e53d6051b7e173722351a5647bfd71eebee3d837.tar.gz llvm-e53d6051b7e173722351a5647bfd71eebee3d837.tar.bz2 llvm-e53d6051b7e173722351a5647bfd71eebee3d837.tar.xz |
Add in support for SPIR to LLVM core. This adds a new target and two new calling conventions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164948 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/Triple.h | 3 | ||||
-rw-r--r-- | include/llvm/CallingConv.h | 20 |
2 files changed, 21 insertions, 2 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index f701a793af..7ff90552c0 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -65,7 +65,8 @@ public: nvptx, // NVPTX: 32-bit nvptx64, // NVPTX: 64-bit le32, // le32: generic little-endian 32-bit CPU (PNaCl / Emscripten) - amdil // amdil: amd IL + amdil, // amdil: amd IL + spir // SPIR: standard portable IR for OpenCL }; enum VendorType { UnknownVendor, diff --git a/include/llvm/CallingConv.h b/include/llvm/CallingConv.h index 4c5ee62670..86e4eebb82 100644 --- a/include/llvm/CallingConv.h +++ b/include/llvm/CallingConv.h @@ -94,7 +94,25 @@ namespace CallingConv { /// MBLAZE_INTR - Calling convention used for MBlaze interrupt support /// routines (i.e. GCC's save_volatiles attribute). - MBLAZE_SVOL = 74 + MBLAZE_SVOL = 74, + + /// SPIR_FUNC - Calling convention for SPIR non-kernel device functions. + /// No lowering or expansion of arguments. + /// Structures are passed as a pointer to a struct with the byval attribute. + /// Functions can only call SPIR_FUNC and SPIR_KERNEL functions. + /// Functions can only have zero or one return values. + /// Variable arguments are not allowed, except for printf. + /// How arguments/return values are lowered are not specified. + /// Functions are only visible to the devices. + SPIR_FUNC = 75, + + /// SPIR_KERNEL - Calling convention for SPIR kernel functions. + /// Inherits the restrictions of SPIR_FUNC, except + /// Cannot have non-void return values. + /// Cannot have variable arguments. + /// Can also be called by the host. + /// Is externally visible. + SPIR_KERNEL = 76 }; } // End CallingConv namespace |