Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CPU]fix_list_iterators_incompatible #28884

Open
wants to merge 1 commit into
base: releases/2023/3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/common/snippets/src/lowered/loop_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,6 @@ size_t LinearIR::LoopManager::replace_with_new_loop(const LinearIR& linear_ir,
for (auto expr_it = loop_begin_pos; expr_it != loop_end_pos; ++expr_it) {
replace_loop_id(*expr_it, old_id, loop_id);
}

const auto old_loop_info = this->get_loop_info(old_id);
const auto old_loop_begin_pos = linear_ir.find(old_loop_info->get_entry_points().front().expr_port->get_expr());
const auto old_loop_end_pos = linear_ir.find(old_loop_info->get_exit_points().back().expr_port->get_expr());
// If new bounds are equal to old loop bounds, this means that old Loop is removed totally from LIR
// In this case old loop info must be completely removed from loop manager
if (loop_begin_pos == old_loop_begin_pos && loop_end_pos == old_loop_end_pos) {
this->remove_loop_info(old_id);
}
Comment on lines -367 to -369
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this part is not needed as the iterators are from different containers hence remove_loop_info is always not executed. Comparing such iterators could trigger assert failure in debug mode and have undefined behavior in release mode.

return loop_id;
}

Expand Down
Loading