r600/sfn: Don't try to re-use iterators when the set is made empty
It seems with libc++ the iterators are invalidated when the set
is emptied during iterating over it.
Fixes: 05fab97
(r600/sfn: Don't try to re-use the iterator when uses is updated)
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/26420>
This commit is contained in:
@@ -375,7 +375,11 @@ CopyPropFwdVisitor::visit(AluInstr *instr)
|
||||
|
||||
auto mov_block_id = instr->block_id();
|
||||
|
||||
while(ii != ie) {
|
||||
/** libc++ seems to invalidate the end iterator too if a std::set is
|
||||
* made empty by an erase operation,
|
||||
* https://gitlab.freedesktop.org/mesa/mesa/-/issues/7931
|
||||
*/
|
||||
while(ii != ie && !dest->uses().empty()) {
|
||||
auto i = *ii;
|
||||
auto target_block_id = i->block_id();
|
||||
|
||||
|
Reference in New Issue
Block a user