From: Francisco Jerez Date: Mon, 30 Apr 2012 13:19:40 +0000 (+0200) Subject: nv50/ir/ra: Fix traversal before the beginning of the active list in buildRIG. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca04e71024ffa0de18a2c9c463da14915bd266f3;p=mesa.git nv50/ir/ra: Fix traversal before the beginning of the active list in buildRIG. --- diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp index 149e4e1a38e..b74faec1d4f 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp @@ -1061,16 +1061,15 @@ GCRA::buildRIG(ArrayList& insns) RIG_Node *cur = values.front(); for (std::list::iterator it = active.begin(); - it != active.end(); - ++it) { + it != active.end();) { RIG_Node *node = *it; if (node->livei.end() <= cur->livei.begin()) { it = active.erase(it); - --it; - } else - if (node->f == cur->f && node->livei.overlaps(cur->livei)) { - cur->addInterference(node); + } else { + if (node->f == cur->f && node->livei.overlaps(cur->livei)) + cur->addInterference(node); + ++it; } } values.pop_front();