summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/Builtins.def
Commit message (Collapse)AuthorAgeFilesLines
* [CodeGen] add remquo to list of recognized library callsSanjay Patel2017-11-041-0/+4
| | | | | | | | | | | | | This is just an oversight because we already do recognize __builtin_remquo() with the same signature. http://en.cppreference.com/w/c/numeric/math/remquo http://pubs.opengroup.org/onlinepubs/9699919799/functions/remquo.html Differential Revision: https://reviews.llvm.org/D39615 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317407 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeGen] fix const-ness of builtin equivalents of <math.h> and <complex.h> ↵Sanjay Patel2017-11-021-129/+129
| | | | | | | | | | | | | | | | | functions that might set errno This just makes const-ness of the builtins match const-ness of their lib function siblings. We're deferring fixing some of these that are obviously wrong to follow-up patches. Hopefully, the bugs are visible in the new test file (added at rL317220). As the description in Builtins.def says: "e = const, but only when -fmath-errno=0". This is step 2 of N to fix builtins and math calls as discussed in D39204. Differential Revision: https://reviews.llvm.org/D39481 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317265 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenMP] Implement omp_is_initial_device() as builtinJonas Hahnfeld2017-10-171-0/+3
| | | | | | | | This allows to return the static value that we know at compile time. Differential Revision: https://reviews.llvm.org/D38968 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316001 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic: make the nan family pureSaleem Abdulrasool2017-10-171-3/+3
| | | | | | | | | | The nan family of math routines do not rely on global state. They do however depend on their parameter. This fits the description of pure: Functions which have no effects except the return value and their return value depends only on the parameters and/or global variables. Mark the family as `readonly`. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315968 91177308-0d34-0410-b5e6-96231b3b80d8
* Basic: adjust attributes on `nan` LIBBUILTINsSaleem Abdulrasool2017-10-131-3/+3
| | | | | | | | | | | | The `nan` family of functions will inspect the contents of the parameter that they are passed. As a result, the function cannot be annotated as `const`. The documentation of the `const` attribute explicitly states this: Note that a function that has pointer arguments and examines the data pointed to must not be declared const. Adjust the annotations on this family of functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@315741 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add half load and store builtinsJan Vesely2017-09-071-0/+6
| | | | | | | | This enables load/stores of half type, without half being a legal type. Differential Revision: https://reviews.llvm.org/D37231 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312742 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms] Implement the __annotation intrinsicReid Kleckner2017-09-051-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312572 91177308-0d34-0410-b5e6-96231b3b80d8
* Add OpenCL 2.0 atomic builtin functions as Clang builtinYaxun Liu2017-08-041-0/+15
| | | | | | | | | | | | | | | | | | | | | | OpenCL 2.0 atomic builtin functions have a scope argument which is ideally represented as synchronization scope argument in LLVM atomic instructions. Clang supports translating Clang atomic builtin functions to LLVM atomic instructions. However it currently does not support synchronization scope of LLVM atomic instructions. Without this, users have to use LLVM assembly code to implement OpenCL atomic builtin functions. This patch adds OpenCL 2.0 atomic builtin functions as Clang builtin functions, which supports generating LLVM atomic instructions with synchronization scope operand. Currently only constant memory scope argument is supported. Support of non-constant memory scope argument will be added later. Differential Revision: https://reviews.llvm.org/D28691 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310082 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add missing subgroup builtinsJoey Gouly2017-08-011-2/+4
| | | | | | | | This adds get_kernel_max_sub_group_size_for_ndrange and get_kernel_sub_group_count_for_ndrange. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@309678 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add support for __builtin_ms_va_list on aarch64Martin Storsjo2017-07-171-0/+5
| | | | | | | | | | | Move builtins from the x86 specific scope into the global scope. Their use is still limited to x86_64 and aarch64 though. This allows wine on aarch64 to properly handle variadic functions. Differential Revision: https://reviews.llvm.org/D34475 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308218 91177308-0d34-0410-b5e6-96231b3b80d8
* Support MS builtins using 'long' on LP64 platformsBruno Cardoso Lopes2017-06-211-15/+16
| | | | | | | | | | | | | | | This allows for -fms-extensions to work the same on LP64. For example, _BitScanReverse is expected to be 32-bit, matching Windows/LLP64, even though long is 64-bit on x86_64 Darwin or Linux (LP64). Implement this by adding a new character code 'N', which is 'int' if the target is LP64 and the same 'L' otherwise Differential Revision: https://reviews.llvm.org/D34377 rdar://problem/32599746 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305875 91177308-0d34-0410-b5e6-96231b3b80d8
* [XRay] Add __xray_customeevent(...) as a clang-supported builtinDean Michael Berris2017-05-091-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: We define the `__xray_customeevent` builtin that gets translated to IR calls to the correct intrinsic. The default implementation of this is a no-op function. The codegen side of this follows the following logic: - When `-fxray-instrument` is not provided in the driver, we elide all calls to `__xray_customevent`. - When `-fxray-instrument` is enabled and a function is marked as "never instrumented", we elide all calls to `__xray_customevent` in that function; if either marked as "always instrumented" or subject to threshold-based instrumentation, we emit a call to the `llvm.xray.customevent` intrinsic from LLVM for each `__xray_customevent` occurrence in the function. This change depends on D27503 (to land in LLVM first). Reviewers: echristo, rsmith Subscribers: mehdi_amini, pelikan, lrl, cfe-commits Differential Revision: https://reviews.llvm.org/D30018 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302492 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement _interlockedbittestandset as a builtinHans Wennborg2017-04-071-0/+1
| | | | | | | | | It's used by MS headers in VS 2017 without including intrin.h, so we can't implement it in the header anymore. Differential Revision: https://reviews.llvm.org/D31736 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299782 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r298491 and r298494 which changed Clang's handling of 'nonnull'Chandler Carruth2017-03-241-33/+27
| | | | | | | | | | | | | | | | | attributes. These patches don't work because we can't currently access the parameter information in a reliable way when building attributes. I thought this would be relatively straightforward to fix, but it seems not to be the case. Fixing this will requrie a substantial re-plumbing of machinery to allow attributes to be handled in this location, and several other fixes to the attribute machinery should probably be made at the same time. All of this will make the patch .... substantially more complicated. Reverting for now as there are active miscompiles caused by the current version. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298695 91177308-0d34-0410-b5e6-96231b3b80d8
* [X86] Implement __readgsqword (and the rest) as builtins (PR32373)Hans Wennborg2017-03-221-1/+0
| | | | | | | | | | | | | | It seems MS headers have started using __readgsqword, and since it's used in a header that doesn't include intrin.h, we can't implement it as an inline function anymore. That was already the case for __readfsdword, which Saleem added support for in r220859. This patch reuses that codegen to implement all of __read[fg]s{byte,word,dword,qword}. Differential Revision: https://reviews.llvm.org/D31248 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298538 91177308-0d34-0410-b5e6-96231b3b80d8
* [nonnull] Teach Clang to attach the nonnull LLVM attribute toChandler Carruth2017-03-221-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declarations and calls instead of just definitions, and then teach it to *not* attach such attributes even if the source code contains them. This follows the design direction discussed on cfe-dev here: http://lists.llvm.org/pipermail/cfe-dev/2017-January/052066.html The idea is that for C standard library builtins, even if the library vendor chooses to annotate their routines with __attribute__((nonnull)), we will ignore those attributes which pertain to pointer arguments that have an associated size. This allows the widespread (and seemingly reasonable) pattern of calling these routines with a null pointer and a zero size. I have only done this for the library builtins currently recognized by Clang, but we can now trivially add to this set. This will be controllable with -fno-builtin if anyone should care to do so. Note that this does *not* change the AST. As a consequence, warnings, static analysis, and source code rewriting are not impacted. This isn't even a regression on any platform as neither Clang nor LLVM have ever put 'nonnull' onto these arguments for declarations. All this patch does is enable it on other declarations while preventing us from ever accidentally enabling it on these libc functions due to a library vendor. It will also allow any other libraries using this annotation to gain optimizations based on the annotation even when only a declaration is visible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298491 91177308-0d34-0410-b5e6-96231b3b80d8
* [coroutines] update coro_end builtin to match llvmGor Nishanov2017-03-071-1/+1
| | | | | | | | | | | | | | Summary: llvm.coro.end intrinsic now returns bool. Updating clang to match it. Reviewers: GorNishanov, rsmith Reviewed By: rsmith Subscribers: mehdi_amini, cfe-commits, EricWF Differential Revision: https://reviews.llvm.org/D30711 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297224 91177308-0d34-0410-b5e6-96231b3b80d8
* Declare lgamma library builtins as never being constJacob Gravelle2017-02-211-3/+5
| | | | | | | | | | | | | | | Summary: POSIX requires lgamma writes to an external global variable, signgam. This prevents annotating lgamma with readnone, which is incorrect on targets that write to signgam. Reviewers: efriedma, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D29778 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295781 91177308-0d34-0410-b5e6-96231b3b80d8
* [MS] Implement the __fastfail intrinsic as a builtinReid Kleckner2017-02-091-0/+1
| | | | | | | | | | __fastfail terminates the process immediately with a special system call. It does not run any process shutdown code or exception recovery logic. Fixes PR31854 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294606 91177308-0d34-0410-b5e6-96231b3b80d8
* P0426: Make the library implementation of constexpr char_traits a little easierRichard Smith2017-01-201-0/+1
| | | | | | | | | | by providing a memchr builtin that returns char* instead of void*. Also add a __has_feature flag to indicate the presence of constexpr forms of the relevant <string> functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292555 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix completely bogus types for some builtins:Richard Smith2016-12-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | * In C++, never create a FunctionNoProtoType for a builtin (fixes C++1z crasher from r289754). * Fix type of __sync_synchronize to be a no-parameter function rather than a varargs function. This matches GCC. * Fix type of vfprintf to match its actual type. We gave it a wrong type due to PR4290 (apparently autoconf generates invalid code and expects compilers to choke it down or it miscompiles the program; the relevant error in clang was downgraded to a warning in r122744 to fix other occurrences of this autoconf brokenness, so we don't need this workaround any more). * Turn off vararg argument checking for __noop, since it's not *really* a varargs function. Alternatively we could add custom type checking for it and synthesize parameter types matching the actual arguments in each call, but that seemed like overkill. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290146 91177308-0d34-0410-b5e6-96231b3b80d8
* Support constant expression evaluation for wchar_t versions of simple stringRichard Smith2016-11-291-0/+16
| | | | | | | functions, in order to support constexpr std::char_traits<wchar_t>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@288193 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for __builtin_alloca_with_alignDavid Majnemer2016-10-311-0/+1
| | | | | | | | | | __builtin_alloca always uses __BIGGEST_ALIGNMENT__ for the alignment of the allocation. __builtin_alloca_with_align allows the programmer to specify the alignment of the allocation. This fixes PR30658. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285544 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for __builtin_os_log_format[_buffer_size]Mehdi Amini2016-10-241-0/+4
| | | | | | | | | | | | | | | | | This reverts commit r285007 and reapply r284990, with a fix for the opencl test that I broke. Original commit message follows: These new builtins support a mechanism for logging OS events, using a printf-like format string to specify the layout of data in a buffer. The _buffer_size version of the builtin can be used to determine the size of the buffer to allocate to hold the data, and then __builtin_os_log_format can write data into that buffer. This implements format checking to report mismatches between the format string and the data arguments. Most of this code was written by Chris Willmore. Differential Revision: https://reviews.llvm.org/D25888 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285019 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add support for __builtin_os_log_format[_buffer_size]"Mehdi Amini2016-10-241-4/+0
| | | | | | This reverts commit r284990, two opencl test are broken git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285007 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for __builtin_os_log_format[_buffer_size]Mehdi Amini2016-10-241-0/+4
| | | | | | | | | | | | | | These new builtins support a mechanism for logging OS events, using a printf-like format string to specify the layout of data in a buffer. The _buffer_size version of the builtin can be used to determine the size of the buffer to allocate to hold the data, and then __builtin_os_log_format can write data into that buffer. This implements format checking to report mismatches between the format string and the data arguments. Most of this code was written by Chris Willmore. Differential Revision: https://reviews.llvm.org/D25888 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284990 91177308-0d34-0410-b5e6-96231b3b80d8
* __builtin_fpclassify missing one int parameterDavid Sheinkman2016-10-141-1/+1
| | | | | | | | | | Patch by Tania Albarghouthi. Differential Revision: https://reviews.llvm.org/D25480 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284277 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement MS _ReturnAddress and _AddressOfReturnAddress intrinsicsAlbert Gutowski2016-10-131-0/+1
| | | | | | | | | | Reviewers: rnk, thakis, majnemer, hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25540 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284131 91177308-0d34-0410-b5e6-96231b3b80d8
* [coroutines] Adding builtins for coroutine intrinsics and backendutil support.Gor Nishanov2016-10-031-0/+16
| | | | | | | | | | | | | Summary: With this commit simple coroutines can be created in plain C using coroutine builtins. Reviewers: rnk, EricWF, rsmith Subscribers: modocache, mgorny, mehdi_amini, beanz, cfe-commits Differential Revision: https://reviews.llvm.org/D24373 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@283155 91177308-0d34-0410-b5e6-96231b3b80d8
* Builtins.def: Explicitly undef finitef, to appease mingw. It defines finitef ↵NAKAMURA Takumi2016-09-151-0/+4
| | | | | | as alias of _finitef. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281582 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some MS aliases for existing intrinsicsAlbert Gutowski2016-09-141-0/+7
| | | | | | | | | | | Reviewers: thakis, compnerd, majnemer, rsmith, rnk Subscribers: alexshap, cfe-commits Differential Revision: https://reviews.llvm.org/D24330 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281540 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert finite to builtinDehao Chen2016-09-141-0/+8
| | | | | | | | | | | | Summary: This patch converts finite/__finite to builtin functions so that it will be inlined by compiler. Reviewers: hfinkel, davidxl, efriedma Subscribers: efriedma, llvm-commits Differential Revision: https://reviews.llvm.org/D24483 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281509 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporary fix for MS _Interlocked intrinsicsAlbert Gutowski2016-09-131-8/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281401 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverse commit 281375 (breaks building Chromium)Albert Gutowski2016-09-131-7/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281399 91177308-0d34-0410-b5e6-96231b3b80d8
* Add bunch of _Interlocked builtinsAlbert Gutowski2016-09-131-6/+35
| | | | | | | | | | | Reviewers: compnerd, thakis, Prazek, majnemer, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24153 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281378 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some MS aliases for existing intrinsicsAlbert Gutowski2016-09-131-0/+7
| | | | | | | | | | | Reviewers: thakis, compnerd, majnemer, rsmith, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24330 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281375 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement MS _rot intrinsicsAlbert Gutowski2016-09-081-0/+10
| | | | | | | | | | | Reviewers: thakis, Prazek, compnerd, rnk Subscribers: majnemer, cfe-commits Differential Revision: https://reviews.llvm.org/D24311 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@280997 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 ↵Anastasia Stulova2016-07-051-0/+6
| | | | | | | | | | | | | | | | | | | | s6.13.17. - Added new Builtins: enqueue_kernel, get_kernel_work_group_size and get_kernel_preferred_work_group_size_multiple. These Builtins use custom check to diagnose parameters of the passed Blocks i. e. variable number of 'local void*' type params, and check different overloads specified in Table 6.31 of OpenCL v2.0. - IR is generated as an internal library call for each OpenCL Builtin, reusing ObjC Block implementation. Review: http://reviews.llvm.org/D20249 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274540 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Make OpenCL Builtins added according to the right version.Anastasia Stulova2016-07-041-19/+19
| | | | | | | | | | | | | Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions. They have to be added only in the version 2.0 compilation mode to make the identifiers available for use in the other versions. Review: http://reviews.llvm.org/D20249 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274509 91177308-0d34-0410-b5e6-96231b3b80d8
* [Builtin] Make __builtin_thread_pointer target-independent.Marcin Koscielnicki2016-06-161-0/+1
| | | | | | | | This is now supported for ARM, AArch64, PowerPC, SystemZ, SPARC, Mips. Differential Revision: http://reviews.llvm.org/D19589 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272893 91177308-0d34-0410-b5e6-96231b3b80d8
* [Title] Revert test commitTaewook Oh2016-06-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Revert test commit Trac Bug: # Blame Rev: Reviewed By: Test Plan: Revert Plan: Database Impact: Memcache Impact: Other Notes: EImportant: - begin *PUBLIC* platform impact section - Bugzilla: # - end platform impact - git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271702 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commit Taewook Oh2016-06-031-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@271701 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Add to_{global|local|private} builtin functions.Yaxun Liu2016-05-201-0/+5
| | | | | | | | | | | | | | | | | | OpenCL builtin functions to_{global|local|private} accepts argument of pointer type to arbitrary pointee type, and return a pointer to the same pointee type in different addr space, i.e. global gentype *to_global(gentype *p); It is not desirable to declare it as global void *to_global(void *); in opencl header file since it misses diagnostics. This patch implements these builtin functions as Clang builtin functions. In the builtin def file they are defined to have signature void*(void*). When handling call expressions, their declarations are re-written to have correct parameter type and return type corresponding to the call argument. In codegen call to addr void *to_addr(void*) is generated with addrcasts or bitcasts to facilitate implementation in builtin library. Differential Revision: http://reviews.llvm.org/D19932 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270261 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the Pure attribute to C99 builtin functions from ctype.h. This is a ↵Aaron Ballman2016-05-041-0/+17
| | | | | | | | corrected version of r266199 with test case fixes. Patch by Taewook Oh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268553 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverting r266199; it causes build bot failures.Aaron Ballman2016-04-131-17/+0
| | | | | | | http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/3255 http://lab.llvm.org:8011/builders/clang-ppc64be-linux/builds/3517 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266201 91177308-0d34-0410-b5e6-96231b3b80d8
* Add functions declared in ctype.h to builtin function database. All ↵Aaron Ballman2016-04-131-0/+17
| | | | | | | | functions are annotated with nothrow and pure attribute, which enables better optimization. Patch by Taewook Oh. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266199 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing __builtin_bitreverse8Matt Arsenault2016-03-231-0/+1
| | | | | | Also add documentation for bitreverse builtins git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264203 91177308-0d34-0410-b5e6-96231b3b80d8
* Add __builtin_canonicalizeMatt Arsenault2016-02-271-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262122 91177308-0d34-0410-b5e6-96231b3b80d8
* Add builtins for bitreverse intrinsicMatt Arsenault2016-02-031-0/+4
| | | | | | | Follow the naming convention that bswap uses since it's a similar sort of operation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259671 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit: R258773 [OpenCL] Pipe builtin functionsXiuli Pan2016-01-261-0/+26
| | | | | | | | | | | | | | | | | | Fix arc patch fuzz error. Summary: Support for the pipe built-in functions for OpenCL 2.0. The pipe builtin functions may have infinite kinds of element types, one approach would be to just generate calls that would always use generic types such as void*. This patch is based on bader's opencl support patch on SPIR-V branch. Reviewers: Anastasia, pekka.jaaskelainen Subscribers: keryell, bader, cfe-commits Differential Revision: http://reviews.llvm.org/D15914 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258782 91177308-0d34-0410-b5e6-96231b3b80d8