diff options
author | Frank Henigman <[email protected]> | 2013-10-01 15:15:41 -0400 |
---|---|---|
committer | José Fonseca <[email protected]> | 2014-05-14 11:05:00 +0100 |
commit | 2c73102dc33bb2ac2475cecd0614a5889db36630 (patch) | |
tree | 37efd6abc770837420e84b42aa302590c491b06c /src/gallium/auxiliary/gallivm/lp_bld_init.h | |
parent | 2ea923cf571235dfe573c35c3f0d90f632bd86d8 (diff) |
gallivm: One code memory pool with deferred free.
Provide a JITMemoryManager derivative which puts all generated code into
one memory pool instead of creating a new one each time code is generated.
This saves significant memory per shader as the pool size is 512K and
a small shader occupies just several K.
This memory manager also defers freeing generated code until you tell
it to do so, making it possible to destroy the LLVM engine while keeping
the code, thus enabling future memory savings.
v2: Fix compilation errors with LLVM 3.4 (Jose)
Signed-off-by: José Fonseca <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_init.h')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.h b/src/gallium/auxiliary/gallivm/lp_bld_init.h index 68f400661a3..e405b8a0e60 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.h +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.h @@ -44,6 +44,7 @@ struct gallivm_state LLVMPassManagerRef passmgr; LLVMContextRef context; LLVMBuilderRef builder; + struct lp_generated_code *code; unsigned compiled; }; |