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

Mathias Fröhlich Mathias.Froehlich at gmx.net
Sun Apr 21 22:31:48 PDT 2013


Hi all,

On Monday, April 22, 2013 00:39:57 Tom Stellard wrote:
[...]

The only pro for further investigating the dlopen flags is that I fear the 
distribution builders who invented dynamic linking in the drivers. That change 
destroyed symbol isolation in the drivers at that point. They will probably 
argue again about the memory footprint on disc and insist on using the 
distribution provided shared llvm at some point, which can only be solved then 
with the dlopen approach.

Tom, to untangle your patch in question from symbol isolation, I think if you 
put 

static void ensure_llvm_is_multithreaded() __attribute__ ((__constructor__));
void ensure_llvm_is_multithreaded()
{
   if (LLVMIsMultithreaded())
      return;
   LLVMStartMultithreaded();
}

into your new created c file, we should be no worse than we were before.

Regarding reproducing the problem at your site:
Does it help to increase the amount of concurrent context creations to a 
higher number than the now coded 100?

> > completely agree with Mathias here. I also suggested on IRC a couple of
> > weeks ago that libllvmradeon should definitely be static and hide all
> > internal symbols and only export those needed by the drivers. That
> > should isolate us mostly from the mess that comes with having multiple
> > LLVM instances (and probably also different versions) around at the same
> > time.
> 
> How would you recommend doing this?  Version scripts?
Probably yes.

Greetings and Thanks

Mathias


More information about the mesa-dev mailing list