[Mesa-dev] [PATCH 1/1] gallium/gallivm: code generation options for LLVM 3.1+

Alexander V. Nikolaev avn at daemon.hole.ru
Mon Sep 24 13:47:38 PDT 2012


On Mon, Sep 24, 2012 at 10:16:23PM +0200, Roland Scheidegger wrote:

> >> This only covers the MCJIT case, but for LLVM 3.2 we no longer use 
> >> MCJIT, and just call LLVMCreateJITCompiler (instead of
> >> lp_build_create_mcjit_compiler_for_module). So I think we need to 
> >> create another version of 
> >> lp_build_create_mcjit_compiler_for_module/LLVMCreateJITCompiler that 
> >> sets up the target as we need it.
> >>
> > 
> > EngineBuilder in lp_build_create_mcjit_compiler_for_module 
> > has option builder.setUseMCJIT(true); I think this behavior should be 
> > configurable via GALLIVM_DEBUG or even via own variable.
> > Or you plan to eliminate ExecutionEngine using at all?
> José might have a more accurate answer but I guess this depends what happens
> in the llvm codebase. Both using jit or mcjit have their own set of issues,
> and at this time the old jit seems less problematic for llvmpipe.
> 

LLVM 3.1 feels much better if initialized via MCJIT code path, but with 
builder.setUseMCJIT(false).

> > (btw -- what minimal LLVM version supported by gallium? maybe some 
> > ifdef's are deprecated?)
> In theory it should still work with llvm 2.6 (but definitely not recommended)
> so all ifdefs are still necessary.
> But yes at some point this stuff should be thrown out and the required llvm
> version updated (probably to 3.0).
> 

Nice news.
2.x and 3.x have significant difference in initialization (no more 
global variables, but EngineBuilder and TargetOptions).

> > Could I try to help with improvement of LLVM related stuff?
> > (May be if someone gives me few hints).
> > 
> > Also I want to help with finishing autotooling src/gallium/ (just 
> > because out-of-source building will be less painful, if we need to 
> > build same source against many versions of LLVM)
> Well with scons out-of-source building isn't painful :-).
> 

I'm just found bug in llvmpipe's Makefile -- lp_test_* not relinked if 
libgallium.a updated. Should I send a patch? ;)


More information about the mesa-dev mailing list