<div dir="ltr">Patch 1 changes how llvm allocates memory to hold generated code, and will save memory for llvm vertex shaders, geometry shaders and llvmpipe.  It's not so pretty but llvm makes life difficult for us: default memory manager is not accessible to derive from.  I also tried generating relocatable code so it could just be copied out, but it would crash in that code.  (Didn't dig into why.)<div>
<div><div><div style>Patch 3 saves additional memory but so far only for vertex shaders.  At a glance it seems simple to do the same for geometry shaders and llvmpipe.  I'll take a stab at those if there is interest.<br>
</div><div style><br></div><div style>No piglit regressions on pineview with gallium driver.  This code has also been in Chrome OS for a few months.</div></div></div></div></div>