mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
gallivm: skip operations if we have a cached object.
If the object is loaded from the cache, a bunch of gallivm/llvm interactions can be skipped. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5049>
This commit is contained in:
parent
7b7c02d161
commit
b15ecb1717
1 changed files with 5 additions and 0 deletions
|
|
@ -573,6 +573,10 @@ gallivm_compile_module(struct gallivm_state *gallivm)
|
|||
gallivm->builder = NULL;
|
||||
}
|
||||
|
||||
if (gallivm->cache && gallivm->cache->data_size) {
|
||||
goto skip_cached;
|
||||
}
|
||||
|
||||
/* Dump bitcode to a file */
|
||||
if (gallivm_debug & GALLIVM_DEBUG_DUMP_BC) {
|
||||
char filename[256];
|
||||
|
|
@ -640,6 +644,7 @@ gallivm_compile_module(struct gallivm_state *gallivm)
|
|||
* implicitly created by the EngineBuilder in
|
||||
* lp_build_create_jit_compiler_for_module()
|
||||
*/
|
||||
skip_cached:
|
||||
LLVMSetDataLayout(gallivm->module, "");
|
||||
assert(!gallivm->engine);
|
||||
if (!init_gallivm_engine(gallivm)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue