[Mesa-dev] llvm compiler cache

Frank Henigman fjhenigman at google.com
Sun Jun 16 10:57:31 PDT 2013

This works (has been in Chrome OS for a while) but only for vertex
shaders, not geometry shaders nor llvmpipe.  I'm afraid I'm completely
ignorant about AMD drivers.
This applies on top of my recently posted memory saving patches.
Without them the cache would take up too much memory, ~1MB per item
compared to ~10KB.

If this is interesting to anyone maybe it can be pushed farther down
and leveraged by geometry shaders, llvmpipe, and more.  I don't know
how much other apps care but it's a big win for Chrome because just
opening an empty tab recompiles some shaders and takes hundreds of
milliseconds on a low-end chromebook.  Revisiting a page with a bunch
of shaders is seconds faster.

Only works with JIT right now, not MCJIT which is perhaps the future.
I see in LLVM 3.3 they've added some kind of caching to MCJIT.  My
cache comes in before generating LLVM source however, thus should have
bigger savings than can be realized at the LLVM level.

Thanks in advance for any comments, and thanks to Jose Fonseca for
some earlier suggestions.
All shortcomings are purely my fault however.

More information about the mesa-dev mailing list