[LLVMdev] LLVM for heterogenous platforms

Olaf Krzikalla krzikalla at gmx.net
Wed Mar 3 07:42:21 PST 2010


Hi llvm,

it's for sure an obvious idea to use llvm as IR for heterogenous
platforms (e.g. CPU+GPU).
In theory someone could write plain C/C++ code, which by clang is
translated to llvm-IL and then
together with JIT-backends packed in an appropriate executable. Thus all
the limitations
and hassles of openCL or CUDA could be avoided. I wonder if there
already is a related project?

Of course in practice this gets much more complicated mainly due to
memory access problems.
But this issues can be adressed later. For the moment I'm just
interested in the reasonability of the general idea.


Best
Olaf


PS: I strongly disagree with the llvm FAQ entry, where sizeof is used to
reason C and C++ as platform-dependent languages. Indeed sizeof is there
to abstract from platform-specifics. Of course you can (ab)use it (e.g.
specialize a template which take int's as template parameters and then
pass a sizeof result). But in general I think that neither C(++) is
platform-dependent nor the llvm-IR needs to be platform-dependent.

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01



More information about the llvm-dev mailing list