From ca04e71024ffa0de18a2c9c463da14915bd266f3 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 30 Apr 2012 15:19:40 +0200 Subject: [PATCH] nv50/ir/ra: Fix traversal before the beginning of the active list in buildRIG. --- src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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(); -- 2.30.2