[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 12:40:44 PDT 2013


Hi Tom,

On Tuesday, April 23, 2013 20:47:24 Tom Stellard wrote:
> First of all, thanks for investigating this.  The information you've
> provided has helped me a lot.
Good to hear that it helps.

> I took a shot at implementing it this way with private static copies of
> llvm.  I've pushed the initial work to this branch:
> git://people.freedesktop.org/~tstellar/mesa llvm-build
> 
> I was able to hide the LLVM symbols by using the --exclude-libs linker
> flag and so far I've tested with glxgears, an opencl example and also
> eglgears and they all work.  I still need to do some more testing, but
> any thoughts on what I've done so far in this branch?

I will look at this as soon as I find time. Probably not before the beginning 
of next week.

For now, I have attached the patch series I mentioned regarding dlopen flags 
which could be an other approach for this. I don't mind which approach you 
really take in the end. Anyway this appears to work up to now. It would have 
the advantage that it also helps other drivers beside r600g with the llvm 
issues and it would help much further for all the non static private symbols 
we have in the drivers. The series is running here in my private tree since 
about half a year.

I have also done a testcase in piglit that shows the current problem with 
r600g and llvm. To be really general we should put an other symbol there 
instead of the llvm context initializer. But as a first test case you can work 
with, this should be sufficient. That one really fails with current r600g/llvm 
and works with the dlopen patch series. Consequently if you want to make sure 
your branch works on a private llvm version, this test needs to pass also.

Feel free to take and improove the provided patches.

Greetings

Mathias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-test-for-driver-private-symbol-isolation.patch
Type: text/x-patch
Size: 4861 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-glx-dri-Use-RTLD_LOCAL-RTLD_DEEPBIND-instead-of-RTLD.patch
Type: text/x-patch
Size: 2137 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-egl-dri2-Use-RTLD_LOCAL-RTLD_DEEPBIND-instead-of-RTL.patch
Type: text/x-patch
Size: 2289 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0011.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-egl-driver-Use-RTLD_DEEPBIND-if-available.patch
Type: text/x-patch
Size: 1314 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0012.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-gbm-dri-Use-RTLD_LOCAL-RTLD_DEEPBIND-instead-of-RTLD.patch
Type: text/x-patch
Size: 2341 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0013.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-mesa-Remove-unused-RTLD_-defines.patch
Type: text/x-patch
Size: 1069 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0014.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-mesa-Use-RTLD_LOCAL-RTLD_DEEPBIND-instead-of-RTLD_GL.patch
Type: text/x-patch
Size: 1642 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0015.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-egl-glx-Use-RTLD_DEEPBIND-if-available.patch
Type: text/x-patch
Size: 1584 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0016.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0008-egl-glx-Load-libGL.so.1-to-get-glx-entry-points.patch
Type: text/x-patch
Size: 1550 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130424/cc4cdf27/attachment-0017.bin>


More information about the mesa-dev mailing list