X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fnv50%2Fcodegen%2Fnv50_ir_bb.cpp;h=6515ba7e0c9a4e79f8acf2bf9d1542511057553b;hb=1e957941735fae514de658c836b8bdaf6c66bc06;hp=991341b3f86a6092db75c3731dd1204065153f63;hpb=78de8c8ab54c50c96bc3fae2fe0976054e0acd14;p=mesa.git diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp index 991341b3f86..6515ba7e0c9 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_bb.cpp @@ -24,8 +24,9 @@ namespace nv50_ir { -Function::Function(Program *p, const char *fnName) +Function::Function(Program *p, const char *fnName, uint32_t label) : call(this), + label(label), name(fnName), prog(p) { @@ -45,6 +46,8 @@ Function::Function(Program *p, const char *fnName) Function::~Function() { + prog->del(this, id); + if (domTree) delete domTree; if (bbArray) @@ -444,10 +447,10 @@ Pass::run(Program *prog, bool ordered, bool skipPhi) bool Pass::doRun(Program *prog, bool ordered, bool skipPhi) { - for (ArrayList::Iterator fi = prog->allFuncs.iterator(); - !fi.end(); fi.next()) { - Function *fn = reinterpret_cast(fi.get()); - if (!doRun(fn, ordered, skipPhi)) + for (IteratorRef it = prog->calls.iteratorDFS(false); + !it->end(); it->next()) { + Graph::Node *n = reinterpret_cast(it->get()); + if (!doRun(Function::get(n), ordered, skipPhi)) return false; } return !err;