summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-09-29 17:22:39 +0100
committerJosé Fonseca <jfonseca@vmware.com>2009-09-29 17:28:15 +0100
commita02ecdf8c2fc5783a4bc82e8cd9d36f0dec7ccec (patch)
tree52309dba2cda4bf7ca1e97df34a147311eedf50d
parent754f48871c3be671031d9a495fc96a42b71da349 (diff)
llvmpipe: First verify LLVM IR, only then run optimizing passes.
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c10
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 9faed5a0b1..d5ce6993c5 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