diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-09-29 17:22:39 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-09-29 17:28:15 +0100 |
commit | a02ecdf8c2fc5783a4bc82e8cd9d36f0dec7ccec (patch) | |
tree | 52309dba2cda4bf7ca1e97df34a147311eedf50d /src/gallium | |
parent | 754f48871c3be671031d9a495fc96a42b71da349 (diff) | |
download | external_mesa3d-a02ecdf8c2fc5783a4bc82e8cd9d36f0dec7ccec.zip external_mesa3d-a02ecdf8c2fc5783a4bc82e8cd9d36f0dec7ccec.tar.gz external_mesa3d-a02ecdf8c2fc5783a4bc82e8cd9d36f0dec7ccec.tar.bz2 |
llvmpipe: First verify LLVM IR, only then run optimizing passes.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 9faed5a..d5ce699 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -582,6 +582,11 @@ generate_fragment(struct llvmpipe_context *lp, * Translate the LLVM IR into machine code. */ + if(LLVMVerifyFunction(variant->function, LLVMPrintMessageAction)) { + LLVMDumpValue(variant->function); + abort(); + } + LLVMRunFunctionPassManager(screen->pass, variant->function); #ifdef DEBUG @@ -589,11 +594,6 @@ generate_fragment(struct llvmpipe_context *lp, debug_printf("\n"); #endif - if(LLVMVerifyFunction(variant->function, LLVMPrintMessageAction)) { - LLVMDumpValue(variant->function); - abort(); - } - variant->jit_function = (lp_jit_frag_func)LLVMGetPointerToGlobal(screen->engine, variant->function); #ifdef DEBUG |