From: Francisco Jerez Date: Mon, 14 Nov 2011 23:18:28 +0000 (+0100) Subject: nv50/ir: Add support for removing functions from a program. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e4b2a1a47ca9a173f6419ed2f12c9fba80e757c;p=mesa.git nv50/ir: Add support for removing functions from a program. --- diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.h b/src/gallium/drivers/nv50/codegen/nv50_ir.h index e803a8b7b7a..25e729eb5d4 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir.h +++ b/src/gallium/drivers/nv50/codegen/nv50_ir.h @@ -1001,6 +1001,7 @@ public: Type getType() const { return progType; } inline void add(Function *fn, int& id) { allFuncs.insert(fn, id); } + inline void del(Function *fn, int& id) { allFuncs.remove(id); } inline void add(Value *rval, int& id) { allRValues.insert(rval, id); } bool makeFromTGSI(struct nv50_ir_prog_info *); diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp index 5a76558863c..8854247db8b 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp @@ -45,6 +45,8 @@ Function::Function(Program *p, const char *fnName) Function::~Function() { + prog->del(this, id); + if (domTree) delete domTree; if (bbArray)