Fixed a exception safety issue in the LLVM to GenIR translation Added a markdown...
authorBenjamin Segovia <devnull@localhost>
Tue, 12 Jun 2012 21:50:06 +0000 (21:50 +0000)
committerKeith Packard <keithp@keithp.com>
Fri, 10 Aug 2012 23:18:30 +0000 (16:18 -0700)
backend/README [new file with mode: 0644]
backend/src/llvm/llvm_to_gen.cpp

diff --git a/backend/README b/backend/README
new file mode 100644 (file)
index 0000000..9483d7e
--- /dev/null
@@ -0,0 +1,64 @@
+OpenCL Compiler
+===============
+
+This code base contains the compiler part of the complete OpenCL stack. The
+run-time is not in this code base and is developed inside "OpenCL runtime"
+project. The compiler is responsible to take a OpenCL language string and to
+compile it into a binary that can be executed on Intel integrated GPUs.
+
+How to build
+------------
+
+The project uses CMake with three profiles:
+
+  1. Debug (-g)
+  2. RelWithDebInfo (-g with optimizations)
+  3. Release (only optimizations)
+Basically, from the root directory of the project
+
+`> mkdir build`
+
+`> ccmake ../ # to configure`
+
+Choose whatever you want for the build
+
+Then press 'c' to configure and 'g' to generate the code
+
+`> make`
+
+The project only depends on LLVM (Low-Level Virtual Machine project). Right
+now, the code has only been compiled with LLVM 3.0. It will not compile with
+any thing older. A small amount of work should be required to make it work
+with LLVM 3.1 but the port is not done. LLVM 3.0 can be downloaded at:
+
+[http://llvm.org/releases/](http://llvm.org/releases/)
+
+Be careful and download LLVM *3.0*
+
+How to run
+----------
+
+There is nothing to do to run it. However, unit tests can be compiled (by
+setting GBE_COMPILE_UTESTS to true). Once compiled, you can simply run
+
+`> ./tester # to run the unit tests`
+
+Limitations
+-----------
+
+Today, the compiler is far from complete. See doc/TODO.md for a (incomplete)
+lists of things to do.
+
+Implementation details
+----------------------
+
+Several key decisions may use the hardware in an usual way. See the following
+documents for the technical details about the compiler implementation:
+
+- [Flat address space](doc/flat\_address\_space)
+- [Unstructured branches](doc/unstructured\_branches)
+- [Scalar intermediate representation](doc/gen\_ir)
+- [Clean backend implementation](doc/backend)
+
+Ben Segovia <benjamin.segovia@intel.com>
+
index a41f4a5..22c3317 100644 (file)
@@ -83,8 +83,7 @@ namespace gbe
 
     // raw_fd_ostream closes stdout. We must reopen it
     o = NULL;
-    int fd;
-    fd = open("/dev/tty", O_WRONLY);
+    const int fd = open("/dev/tty", O_WRONLY);
     stdout = fdopen(fd, "w");
 
     return true;