mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-21 02:50:09 +01:00
r600/sfn: Don't try to re-use the iterator when uses is updated
It seems on libc++ the iterator is invalidated when an element is removed from the set, so make sure that we don't implicitely use the old, invalidated iterator in the range based - open code the loop using while instead. Fixes: f3415c (r600/sfn: copy propagate register load chains) Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7931 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20394>
This commit is contained in:
parent
aace38c2d8
commit
05fab97b2c
1 changed files with 6 additions and 1 deletions
|
|
@ -360,7 +360,12 @@ CopyPropFwdVisitor::visit(AluInstr *instr)
|
|||
auto src = instr->psrc(0);
|
||||
auto dest = instr->dest();
|
||||
|
||||
for (auto& i : dest->uses()) {
|
||||
auto ii = dest->uses().begin();
|
||||
auto ie = dest->uses().end();
|
||||
|
||||
while(ii != ie) {
|
||||
auto i = *ii;
|
||||
++ii;
|
||||
/* SSA can always be propagated, registers only in the same block
|
||||
* and only if they are assigned in the same block */
|
||||
bool can_propagate = dest->has_flag(Register::ssa);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue