summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-04-15libclc: Rename clz.ll to clz_if.ll to ensure it gets built.clzAaron Watry2-1/+1
configure.py treats files that have the same name with the .cl and .ll extensions as overriding eachother. E.g. If you have clz.cl and clz.ll both specified to be built in the same SOURCES file, only the first file listed will actually be built. Since the contents of clz.ll were an interface that is implemented in clz_impl.ll, rename clz.ll to clz_if.ll to make sure that the interface is built.
2013-04-13libclc: llvm assembly implementation of clzAaron Watry5-11/+151
Untested... currently crashes in the same manner as add_sat.
2013-03-23libclc: Add stub clz builtinAaron Watry6-0/+18
For scalar int/uint, attempt to use the clz llvm builtin.. for all others return 0 until an actual implementation is finished.
2013-03-23libclc: implement rotate builtinAaron Watry7-0/+55
This implementation does a lot of bit shifting and masking. Suffice to say, this is somewhat suboptimal... but it does look to produce correct results (after the piglit tests were corrected for sign extension issues). Someone who knows LLVM better than I could re-write this more efficiently.
2013-03-20libclc: Move max builtin to shared/Aaron Watry11-16/+10
Max(x,y) is available for all integer/floating types.
2013-03-20libclc: Add clamp() builtin for integer/floating pointAaron Watry6-0/+24
Created under a new shared/ directory for functions which are available for both integer and floating point types.
2013-03-20libclc: Fix abs_diff builtin integer functionAaron Watry2-1/+2
2013-03-20libclc: Add max() builtin functionAaron Watry10-0/+28
Adds this function for both int and floating data types.
2013-03-20configure: Enable building separate libraries for target variantsAaron Watry1-44/+75
From: Tom Stellard <thomas.stellard at amd.com>
2013-03-20configure: fix out-of-source buildAaron Watry1-2/+3
From: Niels Ole Salscheider <niels_ole@salscheider-online.de>
2013-03-20libclc: Fix libclc build for LLVM 3.3Aaron Watry1-0/+12
LLVM moved a bunch of IR-related headers for version 3.3. This fixes the libclc build to follow suit.
2013-02-11Implement ceil() builtinTom Stellard2-0/+7
2013-02-11Implement fmax() and fmin() builtinsTom Stellard9-0/+76
2013-02-11Remove the static keyword from the _CLC_INLINE macroTom Stellard1-1/+1
static functions are not allowed in OpenCL C
2013-02-11Use brackets around include files in length.cl and normalize.clTom Stellard2-2/+2
These functions were not being compiled
2013-02-11Fix typo in include/clc/geometric/length.incTom Stellard1-1/+1
2013-01-11r600: Add overrides fileTom Stellard1-0/+2
2013-01-11Allow targets to override generic implementationsTom Stellard1-0/+8
Targets can override generic implementations by adding a file called OVERRIDES in $(TARGET_DIR)/lib and listing the generic implementations that it wants to override. For example, to override get_group_id() and get_global_size() you would add these lines to the OVERRIDES file: workitem/get_group_id.cl workitem/get_global_size.cl
2013-01-11Revert "configure: Allow targets to override generic cl implementations with ↵Tom Stellard1-6/+2
LLVM IR" This reverts commit 327f78fd8474eb5e0bd13aaba6c9c4dcc9cd1f1d.
2013-01-08Make libclc more Linux FHS conform.Johannes Obermayr1-14/+51
- First introducing a versioning scheme - Add --libexecdir, --includedir and --pkgconfigdir and prefill them as well as --prefix - Build all targets by default - Create clc.pc and install it in $pkgconfigdir - Use clang++ instead of c++ - Rename builtins.bc to built_libs/$triple.bc and install them in $libexecdir - Includes are installed recursively to $includedir - Finally add $(DESTDIR) for 'make install'
2012-11-13s/-ccc-host-triple/-target/Tom Stellard2-2/+2
2012-11-13configure: Disable NVPTX target by defaultTom Stellard1-1/+1
2012-10-16R600: Replace cl implementations with LLVM IR implementationTom Stellard7-22/+76
This allows libclc to be built for R600 with upstream clang and LLVM.
2012-10-16configure: Allow targets to override generic cl implementations with LLVM IRTom Stellard1-2/+6
2012-10-09Merge branch 'master' of http://llvm.org/git/libclcTom Stellard39-72/+439
Conflicts: generic/include/clc/synchronization/barrier.h generic/include/clc/workitem/get_global_id.h generic/include/clc/workitem/get_global_size.h generic/include/clc/workitem/get_group_id.h generic/include/clc/workitem/get_local_id.h generic/include/clc/workitem/get_local_size.h generic/include/clc/workitem/get_num_groups.h
2012-10-09Revert "Remove NVPTX from default targets, so libclc will work with LLVM 3.1"Tom Stellard1-1/+1
This reverts commit 2713c4ebaf42a1def1141005ff61eb2074ef0097.
2012-10-08Implement any() builtin. Patch by Tom Stellard!Peter Collingbourne4-0/+48
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@165386 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08Add native_powr builtin. Patch by Tom Stellard!Peter Collingbourne2-0/+2
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@165385 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-05Add barrier.cl to SOURCES, spotted by Jin Wang.Peter Collingbourne1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@163227 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-21Add rsqrt builtin. Based on patch by Cassie Epps!Peter Collingbourne3-0/+8
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@162274 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-21Add floor builtin. Patch by Cassie Epps!Peter Collingbourne2-0/+7
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@162273 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05Do not use linkonce_odr linkage in .ll files. This prevented themPeter Collingbourne6-48/+48
from being linked into the library under lazy linkage. git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@161314 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05PTX: move implementations of work-item and synchronisation functionsPeter Collingbourne18-21/+38
to lib, and add header files in generic. Incorporates a patch by Tom Stellard! git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@161313 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05Implement sub_sat builtin. Patch by Lei Mou!Peter Collingbourne10-0/+272
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@161312 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05Fix declarations of __clc_add_sat_*. Patch by Lei Mou!Peter Collingbourne1-8/+8
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@161311 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01configure.py: Add an install rule.Peter Collingbourne2-12/+31
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157821 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01Remove NVPTX from default targets, so libclc will work with LLVM 3.1Tom Stellard1-1/+1
2012-06-01Move R600 headers into generic directoryTom Stellard12-14/+5
2012-06-01r600: Add get_global_size() implementationTom Stellard3-3/+12
2012-06-01r600: Fix get_global_id implementationTom Stellard1-3/+3
2012-06-01r600: Initial supportTom Stellard10-1/+30
This includes a get_global_id() implementation and function stubs for the other workitem and synchronization functions.
2012-05-29Add pow builtin.Peter Collingbourne3-0/+25
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157629 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Enable cl_khr_fp64 when building the library, and fix several bugsPeter Collingbourne6-2/+15
uncovered when doing so. git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157617 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Add missing dot.h include.Peter Collingbourne3-0/+24
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157615 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Define FLOAT in floatn.inc.Peter Collingbourne1-0/+10
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157614 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Add fma, hypot builtins.Peter Collingbourne8-0/+41
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157613 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Implement mad builtin.Peter Collingbourne7-0/+63
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157599 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Implement exp, exp2, log, log2, native_exp, native_exp2, native_log,Peter Collingbourne9-0/+32
native_log2. Patch by Joshua Cranmer! git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157598 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29Fix typo in double precision case.Peter Collingbourne1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157597 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-28Add fabs builtin.Peter Collingbourne3-0/+10
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@157595 91177308-0d34-0410-b5e6-96231b3b80d8