llvmpipe: First verify LLVM IR, only then run optimizing passes.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user