[Mesa-dev] [PATCH] radeon/llvm: Use LLVM C API for compiling LLVM IR to ISA.

Mathias Fröhlich Mathias.Froehlich at gmx.net
Wed Apr 24 22:22:14 PDT 2013


Hi,

On Wednesday, April 24, 2013 21:54:02 Jose Fonseca wrote:
> I don't see how this would work -- llvmpipe/draw has LLVMBuildXxxx calls
> too.  So to prevent symbol collision with apps that use them, we'd need to
> expose all LLVM calls we need under nome unique prefix.
> 
> Also note that gallivm has a lot of function calls. This would also pollute
> the app's namespace.
> 
> In short, for this to work we should do it not for whole gallivm, but with a
> new module, just for LLVM C calls + the additional helpers, and use an
> unique prefix (e.g., MesaLLVMXxxx) for everything.
> 
> And we should have a new header, that #defines LLVMFoo MesaLLVMFoo, so that
> Mesa code doesn't need to be changed all over the place.

Tom sounded that the symbols are more concentrated.
The effort is huge if you need a lot of symbols outside this library, as you 
would basically need an own abstraction of llvm on top of llvm.

Is it possible to hide all llvm calls behind the lp_bld_* interface or similar 
and put this layer into a single shared object statically linked with all of 
llvm?

Again OTOH, the dlopen flags are really made for this kind of module use I 
think ...

Greetings

Mathias


More information about the mesa-dev mailing list