[LLVMdev] LLVM IR is a compiler IR

Renato Golin rengolin at systemcall.org
Wed Oct 5 08:58:38 PDT 2011


On 5 October 2011 16:18, Dan Gohman <gohman at apple.com> wrote:
> I think you're overreacting here.  There is nothing about OpenCL, RenderScript,
> or VMKit that requires LLVM IR be used like a Platform, as I defined it in my
> first paragraph.  I'm aware that some people would like to use LLVM IR as a
> Platform, and I'm saying that there are important high-level considerations
> to make before doing so, and my impression is that there is little discussion of
> issues I consider important.

Hi Dan,

I probably am. And that got in the way of highlighting the real issue.

As Kenneth just highlighted, there is a gap, and people are trying to
fill that gap. I personally prefer to use LLVM for that job, instead
of Java bytecode, and it seems many people feel the same.

So, let's separate the issues here:

 1) LLVM IR is a compiler IR, nothing else, nor should be. I agree
with David, this is not a bad thing. Case closed.

 2) Has LLVM the potential to fill that gap via other routes?

Can LLVM do (one day) what you wanted it to do today? A higher level
representation for light-weight JITs, a rich type-system for complex
linkage of higher languages, special semantics for special purposes,
etc.

Today, LLVM IR is NOT portable, so why worry about the portability of
DSLs around it? OpenCL rep. can be different (in syntax, and
semantics) from C++ rep., but it should be similar to RenderScript
rep. If you want to link CL and C++ reps, lower them to LLVM IR, or
use the common subset.


-- 
cheers,
--renato

http://systemcall.org/




More information about the llvm-dev mailing list