summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-05-24libclc: Initial vload implementationAaron Watry4-0/+86
Should work for all targets and data types. Completely unoptimized.
2013-04-30r600: Fix implementations of get_group_id.ll and get_local_size.llTom Stellard2-12/+12
2013-04-19libclc: Implement clz() builtinAaron Watry7-0/+158
Squashed commit of the following: commit a0df0a0e86c55c1bdc0b9c0f5a739e5adef4b056 Author: Aaron Watry <awatry@gmail.com> Date: Mon Apr 15 18:42:04 2013 -0500 libclc: Rename clz.ll to clz_if.ll to ensure it gets built. 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. commit 931b62bed05c58f737de625bd415af09571a6a5a Author: Aaron Watry <awatry@gmail.com> Date: Sat Apr 13 12:32:54 2013 -0500 libclc: llvm assembly implementation of clz Untested... currently crashes in the same manner as add_sat. commit 6ef0b7b0b6d2e5584086b4b9a9243743b2e0538f Author: Aaron Watry <awatry@gmail.com> Date: Sat Mar 23 12:35:27 2013 -0500 libclc: Add stub clz builtin For scalar int/uint, attempt to use the clz llvm builtin.. for all others return 0 until an actual implementation is finished.
2013-04-19libclc: Add clamp(vec, scalar, scalar) and max(vec, scalar)Aaron Watry4-0/+20
For any GENTYPE that isn't scalar, we need to implement a mixed vector/scalar version of clamp/max. This depends on the min() patches I sent to the list a few minutes ago.
2013-04-19libclc: Implement the min(vec, scalar) version of the min builtin.Aaron Watry4-0/+41
Checks if the current GENTYPE is scalar, and if not, then defines a separate implementation of the function which casts the second arg to vector before proceeding.
2013-04-19libclc: implement initial version of min()Aaron Watry6-0/+22
This doesn't handle the integer cases for min(vector, scalar).
2013-04-19libclc: Rename [add|sub]_sat.ll to [add|sub]_sat_if.llAaron Watry3-2/+2
configure.py allows overloading *.cl with *.ll, but will only ever build the first file listed in SOURCES of ${file}.cl and ${file}.ll add_sat, sub_sat, (and the soon to be submitted clz) all define interfaces in ${function_name}.ll which are implemented in ${function_name}_impl.ll. Renaming the interface files is enough to get them to build again, fixing CL usage of these functions. Tested on clover/r600g.
2013-04-08Add a another TODO note.Aaron Watry1-0/+3
2013-04-08Add a TODO note.Aaron Watry1-0/+4
2013-04-08Simplify rotate implementation a bit..Aaron Watry2-21/+37
Much more understandable/readable as a result, and probably more efficient.
2013-04-08libclc: 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-04-08libclc: Move max builtin to shared/Aaron Watry11-16/+10
Max(x,y) is available for all integer/floating types.
2013-04-08libclc: 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-04-08libclc: Fix abs_diff builtin integer functionAaron Watry2-1/+2
2013-04-08libclc: Add max() builtin functionAaron Watry10-0/+28
Adds this function for both int and floating data types.
2013-04-05configure: Enable building separate libraries for target variantsTom Stellard1-44/+75
2013-03-08configure: fix out-of-source buildNiels Ole Salscheider1-2/+3
2013-03-08Fix build with LLVM 3.3Niels Ole Salscheider1-4/+4
2013-02-11Implement ceil() builtinllvm-3.2Tom 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'
2013-01-01Update the copyright coredits -- Happy new year 2013!NAKAMURA Takumi1-2/+2
git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@171342 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-05Fix build against recent versions of Clang. Based on patch by Alastair ↵Peter Collingbourne2-3/+4
Donaldson! git-svn-id: https://llvm.org/svn/llvm-project/libclc/trunk@169362 91177308-0d34-0410-b5e6-96231b3b80d8
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.