diff options
author | Francisco Jerez <[email protected]> | 2012-04-30 15:19:40 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2013-03-12 12:55:33 +0100 |
commit | ca04e71024ffa0de18a2c9c463da14915bd266f3 (patch) | |
tree | 198d4c6978e242ada4dd0b72effc4e9394e9bb80 /src/gallium/drivers | |
parent | fe17d8a7c01c65e059a1edd13938f73ad2d9f025 (diff) |
nv50/ir/ra: Fix traversal before the beginning of the active list in buildRIG.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp | 11 |
1 files 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<RIG_Node *>::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(); |