Homer Hsing [Tue, 20 Nov 2012 01:51:03 +0000 (09:51 +0800)]
Test case for OpenCL 1.1 supported data types
Homer Hsing [Tue, 20 Nov 2012 01:31:17 +0000 (09:31 +0800)]
Add test case, OpenCL 1.1 Math Built-in Functions
Homer Hsing [Mon, 19 Nov 2012 08:17:31 +0000 (16:17 +0800)]
test creating program objects, build program executable, build options, query program objects
Homer Hsing [Fri, 2 Nov 2012 05:06:52 +0000 (13:06 +0800)]
Fix up README.md
miss a line "cd build" in section "How to build"
Zhigang Gong [Wed, 28 Nov 2012 08:01:26 +0000 (16:01 +0800)]
new test case from Nanhai.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Zhigang Gong [Fri, 16 Nov 2012 07:29:37 +0000 (15:29 +0800)]
First implementation for extension cl_khr_gl_sharing.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Zhigang Gong [Fri, 16 Nov 2012 07:22:36 +0000 (15:22 +0800)]
Remove glext.h.
It's part of ogl not ocl.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Zhigang Gong [Fri, 29 Mar 2013 10:35:12 +0000 (18:35 +0800)]
Only llvm3.0 and 3.1 have TargetData.h.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Zhigang Gong [Fri, 29 Mar 2013 10:26:31 +0000 (18:26 +0800)]
Fixed a potential Null pointer reference in emitMovForPHI.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Benjamin Segovia [Sat, 17 Nov 2012 02:10:07 +0000 (18:10 -0800)]
Updated comment on lost copy since it is supported now
Benjamin Segovia [Sat, 17 Nov 2012 02:05:59 +0000 (18:05 -0800)]
Implemented a work around for LLVM / clang 3.2. They handle swizzle of constant
vectors in a weird way such that the final LLVM code uses ConstantExpr which are
not supported yet. So, I modified the kernels to make them work.
Still two kernels are not working. They basically use undefined values which are
actually used. I am not supporting such case right now. It would be the
opportunity to simplify all this.
LLVM 3.2 works now. I needed to deactivate fmulall though. The code does not
seem to be correct. Well, I am not sure. May be related to the llvm+clang
version I have.
Benjamin Segovia [Fri, 16 Nov 2012 19:24:23 +0000 (11:24 -0800)]
Improved llvm 3.2 support (remove some warnings using nasty macros)
Benjamin Segovia [Fri, 16 Nov 2012 03:59:53 +0000 (19:59 -0800)]
Fixed lost copy issue when deSSAing the code. Yeah for even more MOV!!
global copy propagation is overdue!
Benjamin Segovia [Wed, 14 Nov 2012 04:55:06 +0000 (20:55 -0800)]
Added complete support for barrier (and use of SLM)
Added some tests to assert this functionnality
Benjamin Segovia [Tue, 13 Nov 2012 04:48:00 +0000 (20:48 -0800)]
Started to implement OpenCL barrier() function
Benjamin Segovia [Sat, 10 Nov 2012 04:50:58 +0000 (20:50 -0800)]
Started the boiler plate for barrier (and fences) instructions
Improved the comment on the instruction selection
Benjamin Segovia [Sat, 10 Nov 2012 04:28:17 +0000 (20:28 -0800)]
Removed MAD instruction in the IR
Benjamin Segovia [Sat, 10 Nov 2012 04:16:24 +0000 (20:16 -0800)]
Added support for __local pointer in kernel arguments. This require to add more
features in the run-time and proper support in the rest of the compiler
Benjamin Segovia [Fri, 9 Nov 2012 09:26:51 +0000 (01:26 -0800)]
Updated README since LLVM 3.1 is supported and LLVM 3.2 is almost supported
Benjamin Segovia [Fri, 9 Nov 2012 09:25:29 +0000 (01:25 -0800)]
Improved the comment on the LLVM pass
Benjamin Segovia [Fri, 9 Nov 2012 09:05:16 +0000 (01:05 -0800)]
Fixed more warning with LLVM 3.2
Redisabled LLVM 3.2. There are still problems. Some kernels output wrong code.
It is certainly the lost copy issue.
Benjamin Segovia [Fri, 9 Nov 2012 08:52:47 +0000 (00:52 -0800)]
Fixed inverted assertion
Benjamin Segovia [Fri, 9 Nov 2012 08:46:08 +0000 (00:46 -0800)]
Added a lengthy comment on the LLVM to Gen IR translation
Benjamin Segovia [Fri, 9 Nov 2012 08:30:35 +0000 (00:30 -0800)]
Forbid use of LLVM 3.2 since there are still issues with the code generated by
clang 3.2
Benjamin Segovia [Fri, 9 Nov 2012 08:29:08 +0000 (00:29 -0800)]
Fixed a warning when compiling with LLVM 3.1
Replaced invocatiopn of clang with dirty "system()" by a cleaner "popen()". The
cleanest solution should to use the clang API
Benjamin Segovia [Fri, 9 Nov 2012 08:06:21 +0000 (00:06 -0800)]
Finished proper support for LLVM 3.1
All tests pass
Benjamin Segovia [Fri, 9 Nov 2012 07:56:57 +0000 (23:56 -0800)]
Fixed a bug in llvm Gen backend
Benjamin Segovia [Fri, 9 Nov 2012 07:38:27 +0000 (23:38 -0800)]
Fixed preprocessor defines for LLVM 3.0
Benjamin Segovia [Fri, 9 Nov 2012 06:58:18 +0000 (22:58 -0800)]
Cleaned some old bitrot code in llvm_gen_backend
Started to implement support for llvm 3.2. There are problems for complex
kernels with this version. Maybe the lost copy issue.
Benjamin Segovia [Fri, 9 Nov 2012 03:22:48 +0000 (19:22 -0800)]
Enabled assertions and internal errors for the compiler. The compiler missed too
many things to turn that off
Benjamin Segovia [Fri, 9 Nov 2012 03:06:35 +0000 (19:06 -0800)]
Added support for llvm 3.1
Cleaned up some warnings
Forced pedantic option removal in the Makefile
Benjamin Segovia [Fri, 9 Nov 2012 00:24:26 +0000 (16:24 -0800)]
Fixed a leak in the code using libdrm_intel
Benjamin Segovia [Thu, 8 Nov 2012 05:50:28 +0000 (21:50 -0800)]
Made a quick pass to clean up a bit the headers (there is way too many "INLINE"
methods in this code)
Benjamin Segovia [Thu, 8 Nov 2012 05:24:05 +0000 (21:24 -0800)]
Removed one useless rforeach for the basic blocks
Benjamin Segovia [Thu, 8 Nov 2012 05:10:30 +0000 (21:10 -0800)]
Removed old bits of ir::Instruction
Benjamin Segovia [Thu, 8 Nov 2012 05:03:05 +0000 (21:03 -0800)]
Started to revamp ir::Instruction class to make it use intrusive_list instead
Benjamin Segovia [Wed, 7 Nov 2012 08:41:20 +0000 (00:41 -0800)]
Added supports for loads and stores of float8/float16
Benjamin Segovia [Wed, 7 Nov 2012 07:55:21 +0000 (23:55 -0800)]
Implemented merge of identical immediates per basic block
Benjamin Segovia [Wed, 7 Nov 2012 07:09:17 +0000 (23:09 -0800)]
Added a new menger sponge with no shadow (just to have an extra kernel a bit
simpler than menger sponge itself)
Benjamin Segovia [Wed, 7 Nov 2012 07:02:07 +0000 (23:02 -0800)]
Added support for select instructions with embedded compares
Added missing Julia missing tests
Benjamin Segovia [Wed, 7 Nov 2012 03:02:22 +0000 (19:02 -0800)]
Changed style of the comment for insn scheduling
Benjamin Segovia [Wed, 7 Nov 2012 02:59:42 +0000 (18:59 -0800)]
Made the zero cycle strategy work. This stronly limits the register pressure.
Added a simpler version of Julia.
Added a lengthy comment on the instruction scheduling strategy
Benjamin Segovia [Wed, 7 Nov 2012 01:47:26 +0000 (17:47 -0800)]
Added a additional rule for MADs. When we try to avoid spilling, we do not
generate MADs
Benjamin Segovia [Wed, 7 Nov 2012 01:42:51 +0000 (17:42 -0800)]
Added more features to the instruction scheduler to support both pre-register
allocation and post-register allocation scheduling
Well, we really need to implement something really good for the pre-reg
allocation scheduling to avoid spilling (which is not supported anyway today)
Benjamin Segovia [Tue, 6 Nov 2012 06:32:13 +0000 (22:32 -0800)]
Fixed a potential bug with cvar
Fixed MAD related cvar initialization in c++ pre-main
Benjamin Segovia [Tue, 6 Nov 2012 06:03:52 +0000 (22:03 -0800)]
Added julia set
Improved a bit the MOV removal pass
Benjamin Segovia [Tue, 6 Nov 2012 04:39:43 +0000 (20:39 -0800)]
Added three kernels from Inigo website. Be aware that glsl mod functions is not
the same as ocl one... Damn :-)
Benjamin Segovia [Tue, 6 Nov 2012 01:49:48 +0000 (17:49 -0800)]
Farctorized the code for the kernels I picked up from Inigo websites
Benjamin Segovia [Tue, 6 Nov 2012 01:01:59 +0000 (17:01 -0800)]
Removed the remaining bits of the Gen specific extensions. Much cleaner code
now.
Benjamin Segovia [Mon, 5 Nov 2012 23:41:58 +0000 (15:41 -0800)]
Started to remove support for gen extensions. This was basically a quick fire
and forget code to play a bit with ideas similar to what NV proposed. The goal
is to make the code we have as much clear as we can. So, I just removed
everything.
Benjamin Segovia [Mon, 5 Nov 2012 23:29:58 +0000 (15:29 -0800)]
Removed the remaining bits of the c++ simulator. We only need the support for
real hardware here. Nothing more.
Benjamin Segovia [Sat, 3 Nov 2012 04:19:14 +0000 (21:19 -0700)]
Updated the utest Makefile
Benjamin Segovia [Sat, 3 Nov 2012 04:12:41 +0000 (21:12 -0700)]
- Added reference images for all the remaining tests that need them
- Added a lengthy comment on instruction selection
- Added some new patters to improve immediate matching
Benjamin Segovia [Sat, 3 Nov 2012 02:36:17 +0000 (19:36 -0700)]
- Made ribbon test pass (still need to generate the golden image)
- Fixed a corner case with the register allocator. Actually, the insn selection is
able to remove dead code automatically. So, I handle this case now.
- Added a first support for undef values in vectors in the llvm to gen IR
compiler
Benjamin Segovia [Sat, 3 Nov 2012 01:42:03 +0000 (18:42 -0700)]
Add support for insertion into vector of constants
Benjamin Segovia [Sat, 3 Nov 2012 00:55:20 +0000 (17:55 -0700)]
Made compiler_clod pass. The image is now properly computed.
I basically added a bunch of new intrinsics and cleaned a bit the ocl std
library. Well, it is not going to be compliant for a while with the spec (mostly
due to precision issues and the way denormals and nan are handled). But,
it should do the job for now.
Started to add a more complex test called "ribbon"
Benjamin Segovia [Fri, 2 Nov 2012 21:25:42 +0000 (14:25 -0700)]
Removed outdated html documentation files. Markdown files are OK.
Benjamin Segovia [Tue, 23 Oct 2012 02:39:02 +0000 (19:39 -0700)]
Changed name of CMake utest program to make it match with the "Makefile version"
Benjamin Segovia [Tue, 23 Oct 2012 02:20:46 +0000 (19:20 -0700)]
Removed c++ simulator documentation since it is going to be deprecated
Changed the name to "Beignet" for the complete project
Benjamin Segovia [Fri, 12 Oct 2012 18:31:31 +0000 (18:31 +0000)]
Removed use of exceptions since LLVM may not support them (depending on how it
is compiled)
Benjamin Segovia [Fri, 12 Oct 2012 17:44:20 +0000 (17:44 +0000)]
Fixed 32 bit compilation issue. Unfortunately dropped an alignment requirement
for the instructions
Benjamin Segovia [Wed, 10 Oct 2012 19:26:48 +0000 (19:26 +0000)]
Started to add geometric functions (see OpenCL spec)
Benjamin Segovia [Wed, 10 Oct 2012 19:05:59 +0000 (19:05 +0000)]
Added support for various math functions
Benjamin Segovia [Wed, 10 Oct 2012 15:40:33 +0000 (15:40 +0000)]
Pushed back original headers we partially lost during the code base merge. Now
everything is properly tracked
Benjamin Segovia [Tue, 9 Oct 2012 21:29:39 +0000 (21:29 +0000)]
Reset mandelbrot dimensions
Benjamin Segovia [Tue, 9 Oct 2012 21:25:24 +0000 (21:25 +0000)]
Fixed select OCL builtin
Added a new mandelbrot (more efficient) still to improve regression and
funtionality coverage
Benjamin Segovia [Tue, 9 Oct 2012 20:47:50 +0000 (20:47 +0000)]
Fixed a bug in the flag register allocator
Started to add more brutal test to improve functional regressions. Kind of
needed for big modifications that are going to come
Check switch case lowering functionality
Benjamin Segovia [Mon, 8 Oct 2012 19:47:56 +0000 (19:47 +0000)]
Separate instruction data from the rest to prepare intrusive_list use for
ir::Instruction
Benjamin Segovia [Mon, 8 Oct 2012 19:39:33 +0000 (19:39 +0000)]
Used intrusive_list for SelectionVector
Benjamin Segovia [Mon, 8 Oct 2012 19:33:06 +0000 (19:33 +0000)]
Used intrusive_list for SelectionBlock
Removed some of the verbose and useless foreach
Benjamin Segovia [Mon, 8 Oct 2012 19:14:21 +0000 (19:14 +0000)]
Used intrusive_list for SelectionInstruction
Benjamin Segovia [Mon, 8 Oct 2012 18:54:23 +0000 (18:54 +0000)]
Added some more public functionality for intrusive_list
Benjamin Segovia [Mon, 8 Oct 2012 17:38:37 +0000 (17:38 +0000)]
Used intrusive_list for forward list instruction scheduling
Benjamin Segovia [Mon, 8 Oct 2012 16:02:02 +0000 (16:02 +0000)]
Added intrusive list implementation from Maciej Sinilo (MIT licensed)
Benjamin Segovia [Mon, 8 Oct 2012 15:20:37 +0000 (15:20 +0000)]
Removed utest kernels used for the (removed) internal tests
Benjamin Segovia [Mon, 8 Oct 2012 15:17:05 +0000 (15:17 +0000)]
Cleaned up disassembly code to make it used the new files (and not the mesa
files I quickly and dirtily included)
Benjamin Segovia [Mon, 8 Oct 2012 14:51:31 +0000 (14:51 +0000)]
Removed compiler internal utests. We now have the OCL unit tests. We do not need
anymore to test each internal component as we did when the OCL parsing was not
here
Benjamin Segovia [Mon, 8 Oct 2012 14:50:47 +0000 (14:50 +0000)]
Fixed issue with flag register encoding in instruction scheduling
Benjamin Segovia [Mon, 8 Oct 2012 02:00:39 +0000 (02:00 +0000)]
Activated instruction scheduling
Implemented fall back to SIMD8 when register allocation fails
Cleaned up some memory leaks when exception is triggered
Benjamin Segovia [Mon, 8 Oct 2012 00:59:40 +0000 (00:59 +0000)]
Fixed compilation issue with gcc 4.6
Benjamin Segovia [Fri, 5 Oct 2012 19:44:16 +0000 (19:44 +0000)]
Handled null register when scheduling
Changed the way accumulator is written in the pre-ISA
Benjamin Segovia [Thu, 4 Oct 2012 22:08:10 +0000 (22:08 +0000)]
Almost finished instruction scheduling. Just need to handle accumulator write
update when AccWrEn is set
Benjamin Segovia [Thu, 4 Oct 2012 22:03:35 +0000 (22:03 +0000)]
Fixed bug in growing pool allocator
Benjamin Segovia [Thu, 4 Oct 2012 21:12:53 +0000 (21:12 +0000)]
Fixed read/write dependencies for the insn scheduler
Benjamin Segovia [Tue, 2 Oct 2012 19:46:42 +0000 (19:46 +0000)]
Started to make instruction scheduling work
Benjamin Segovia [Fri, 21 Sep 2012 20:46:06 +0000 (20:46 +0000)]
First implementation (untested) of instruction scheduling. Now it is pretty
clear that a clean and generic implementation of intrusive_list is *overdue*
Benjamin Segovia [Wed, 19 Sep 2012 20:40:10 +0000 (20:40 +0000)]
Removed unused files
Added extra functionalities to debug special allocator with valgrind
Benjamin Segovia [Wed, 19 Sep 2012 20:07:36 +0000 (20:07 +0000)]
Cleaned up instruction selection interface. Push everything back to the cpp
using opaque implementation.
The selection implementation is a big blob now to split up
Benjamin Segovia [Wed, 19 Sep 2012 17:59:23 +0000 (17:59 +0000)]
Cleaned up register allocator interface to limit dependencies
It uses now a pimpl interface
Benjamin Segovia [Wed, 19 Sep 2012 17:32:39 +0000 (17:32 +0000)]
Made SelectionInstruction variable sized
Also used a linear allocator for them (for fast variable size allocation)
Benjamin Segovia [Wed, 19 Sep 2012 17:12:49 +0000 (17:12 +0000)]
Implemented linear allocator to have both fast instruction allocation and
variable size for them
Started to revamp SelectionInstruction to make them variable sized
Benjamin Segovia [Tue, 18 Sep 2012 20:03:01 +0000 (20:03 +0000)]
Started to implemented instruction scheduling
Benjamin Segovia [Tue, 18 Sep 2012 18:52:51 +0000 (18:52 +0000)]
Improved MOVs generation while resolving PHIs
bsegovia [Mon, 17 Sep 2012 18:36:47 +0000 (18:36 +0000)]
Fixed a warning with gcc 4.7 related to the use of zero sized arrays...
bsegovia [Mon, 17 Sep 2012 18:33:55 +0000 (18:33 +0000)]
Implemented greedy instruction on DAG. The idea is mostly to merge instructions
bottom to top marking instructions to be generated on the fly
Several patterns are implemented like using immediates as the second source or
merging mul and add into mads
Actually implemented the MAD encoding at the same time.
bsegovia [Mon, 17 Sep 2012 18:01:32 +0000 (18:01 +0000)]
Added proper flag register allocation. Flag are spilled into GRFs. The spilling
code is not reaaly efficient i.e. sometimes the spilling can be avoided in a
basic block but it is still done. The idea is to improve that when the general
GRF spilling will be implemented. Right now, it works, so it is good enough
bsegovia [Mon, 17 Sep 2012 15:53:57 +0000 (15:53 +0000)]
Pushed back modified files for Gen extension support
Added tests in CMake files
bsegovia [Mon, 17 Sep 2012 12:46:31 +0000 (12:46 +0000)]
Added support for some Gen extensions. The idea is mostly to play with Gen
specific hardware and propose simple way to use them. We have three extensions
here:
- Gen register regions. This allows us to perform strided loads in the register
file. To implement that on top of OCL, the idea is to encapsulate them in a
function with a side effect. Not really clean but it works.
- Gen gather from register file. Same idea but here we simply gather data from
a bunch of registers
- Vote any/all. This is basically the same idea as ptx i.e. uniform predicates
for branches.
- block read/write. Just to play with uniform load/store messages
I added a bunch of tests for all that and fix thing here and there to make them
work
bsegovia [Mon, 13 Aug 2012 16:42:01 +0000 (16:42 +0000)]
Fixed a bug in register allocator
bsegovia [Mon, 13 Aug 2012 16:33:09 +0000 (16:33 +0000)]
Fixed a bug with LLVM alloca
Fixed CFG linearization
Fixed a bug with function stack