[LLVMdev] Dynamic configuration for llvmc2

Patrick Walton pcwalton at cs.ucla.edu
Tue Nov 18 12:02:51 PST 2008



On Nov 18, 2008, at 10:56 AM, "Anton Korobeynikov" <anton at korobeynikov.info 
 > wrote:

> Hello, Patrick
>
>> How does this sound?
> You need to be really careful and separate different aims. Currently
> you will definitely sacrifice speed for scriptability. As for
> cross-compilers - all $ENV & hooks stuff was introduced to
> transparently switch from one compiler tree into another. Maybe this
> approach needs to be generalized / rethought.
>
> In general, I'd not go this way due to reasons I already mentioned.
> Maybe it will be better to formulate the aims you want to achieve and
> think how they can be solved within current infrastructure, or, if
> this won't be enough - think how it can be extended in the full
> generality.

Ok, so runtime scripting languages are out, owing to speed concerns.

I still don't think that TableGen is good as a programming language  
though. I think it's inevitable that a simple graph description is not  
enough for an industrial-grade compiler driver, with the plethora of  
options it needs to support.

IMO a tiny domain-specific programming language would be better. Maybe  
such a language could be implemented with LLVM itself. That is, the  
llvmc configuration language could be compiled into .so files with the  
aid of LLVM. I keep running into bugs in TableGen because it uses  
token pasting to create C++ program logic. This works fine for data  
description, but LLVMC tries to make function bodies this way. I think  
this approach is more trouble than it's worth.

Would a minimalist custom language that statically compiles  
configuration into LLVMC be the right design, or would you suggest  
something else?

Patrick



More information about the llvm-dev mailing list