Mesa (7.9): ir_dead_functions: Actually free dead functions and signatures.

Ian Romanick idr at kemper.freedesktop.org
Wed Dec 15 14:06:29 PST 2010


Module: Mesa
Branch: 7.9
Commit: 6e5907c3903eb2f54610c4391a279b64330e0357
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e5907c3903eb2f54610c4391a279b64330e0357

Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Nov  8 16:10:46 2010 -0800

ir_dead_functions: Actually free dead functions and signatures.

This makes linked shaders use around 36k less memory since the
built-in prototypes are now freed.
(cherry picked from commit a457ca7844c7943e17aa18a73757cc4ac965e200)

---

 src/glsl/ir_dead_functions.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/glsl/ir_dead_functions.cpp b/src/glsl/ir_dead_functions.cpp
index 2655444..16037a2 100644
--- a/src/glsl/ir_dead_functions.cpp
+++ b/src/glsl/ir_dead_functions.cpp
@@ -125,6 +125,7 @@ do_dead_functions(exec_list *instructions)
 
       if (!entry->used) {
 	 entry->signature->remove();
+	 delete entry->signature;
 	 progress = true;
       }
       delete(entry);
@@ -143,6 +144,7 @@ do_dead_functions(exec_list *instructions)
 	  * symbol table should be OK.
 	  */
 	 func->remove();
+	 delete func;
 	 progress = true;
       }
    }



More information about the mesa-commit mailing list