Mesa (master): gallivm: Remove lp_func_delete_body.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Wed May 14 10:06:06 UTC 2014


Module: Mesa
Branch: master
Commit: b18b7781b2311134d16495393413abc1be66accc
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b18b7781b2311134d16495393413abc1be66accc

Author: José Fonseca <jfonseca at vmware.com>
Date:   Mon May 12 16:12:32 2014 +0100

gallivm: Remove lp_func_delete_body.

Not necessary, now that we will free the whole module (hence all
function bodies) immediately after compiling.

Reviewed-by: Roland Scheidegger <sroland at vmware.com>

---

 src/gallium/auxiliary/gallivm/lp_bld_init.c   |    3 ---
 src/gallium/auxiliary/gallivm/lp_bld_misc.cpp |    8 --------
 src/gallium/auxiliary/gallivm/lp_bld_misc.h   |    4 ----
 3 files changed, 15 deletions(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 36d1bc5..a39c1a3 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -605,8 +605,5 @@ gallivm_jit_function(struct gallivm_state *gallivm,
    lp_profile(func, code);
 #endif
 
-   /* Free the function body to save memory */
-   lp_func_delete_body(func);
-
    return jit_func;
 }
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 8825e54..d03680f 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -117,14 +117,6 @@ lp_set_target_options(void)
 }
 
 
-extern "C" void
-lp_func_delete_body(LLVMValueRef FF)
-{
-   llvm::Function *func = llvm::unwrap<llvm::Function>(FF);
-   func->deleteBody();
-}
-
-
 extern "C"
 LLVMValueRef
 lp_build_load_volatile(LLVMBuilderRef B, LLVMValueRef PointerVal,
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.h b/src/gallium/auxiliary/gallivm/lp_bld_misc.h
index 847894b..64d2a04 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.h
@@ -46,10 +46,6 @@ extern void
 lp_set_target_options(void);
 
 
-extern void
-lp_func_delete_body(LLVMValueRef func);
-
-
 extern LLVMValueRef
 lp_build_load_volatile(LLVMBuilderRef B, LLVMValueRef PointerVal,
                        const char *Name);




More information about the mesa-commit mailing list