llvmpipe: delete function bodies after generating machine code
This commit is contained in:
parent
6c288d06ac
commit
042018a943
|
@ -826,6 +826,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant)
|
|||
if (gallivm_debug & GALLIVM_DEBUG_ASM) {
|
||||
lp_disassemble(code);
|
||||
}
|
||||
lp_func_delete_body(variant->function);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1001,6 +1002,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian
|
|||
if (gallivm_debug & GALLIVM_DEBUG_ASM) {
|
||||
lp_disassemble(code);
|
||||
}
|
||||
lp_func_delete_body(variant->function_elts);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -44,5 +44,7 @@ extern LLVMPassManagerRef lp_build_pass;
|
|||
void
|
||||
lp_build_init(void);
|
||||
|
||||
extern void
|
||||
lp_func_delete_body(LLVMValueRef func);
|
||||
|
||||
#endif /* !LP_BLD_INIT_H */
|
||||
|
|
|
@ -166,3 +166,11 @@ lp_set_target_options(void)
|
|||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
extern "C" void
|
||||
lp_func_delete_body(LLVMValueRef FF)
|
||||
{
|
||||
llvm::Function *func = llvm::unwrap<llvm::Function>(FF);
|
||||
func->deleteBody();
|
||||
}
|
||||
|
|
|
@ -715,6 +715,7 @@ generate_fragment(struct llvmpipe_context *lp,
|
|||
if (gallivm_debug & GALLIVM_DEBUG_ASM) {
|
||||
lp_disassemble(f);
|
||||
}
|
||||
lp_func_delete_body(function);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue