From 5e4b2a1a47ca9a173f6419ed2f12c9fba80e757c Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 15 Nov 2011 00:18:28 +0100 Subject: [PATCH] nv50/ir: Add support for removing functions from a program. --- src/gallium/drivers/nv50/codegen/nv50_ir.h | 1 + src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.h b/src/gallium/drivers/nv50/codegen/nv50_ir.h index e803a8b..25e729e 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 5a76558..8854247 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) -- 2.7.4