@@ -123,7 +123,7 @@ std::pair<LinearIR::constExprIt, LinearIR::constExprIt> LoopManager::get_loop_bo
123
123
}
124
124
125
125
LoopPort LoopManager::get_loop_port_by_expr_port (const ExpressionPort& expr_port, const size_t loop_id) {
126
- auto get_loop_port = [&](const std::vector<LoopPort>& ports) {
126
+ auto get_loop_port = [&](const std::vector<LoopPort>& ports) -> const LoopPort& {
127
127
auto it = std::find_if (ports.cbegin (), ports.cend (), [&](const LoopPort& p) { return *p.expr_port == expr_port; });
128
128
if (it == ports.cend ())
129
129
OPENVINO_THROW (" Expression has not been found among loop ports. Loop id: " + std::to_string (loop_id));
@@ -272,7 +272,7 @@ void LoopManager::fuse_loops(LinearIR::constExprIt loop_begin_target, LinearIR::
272
272
auto input_ports_upper = loop_info_upper->get_input_ports ();
273
273
auto output_ports_upper = loop_info_upper->get_output_ports ();
274
274
auto input_ports_lower = loop_info_lower->get_input_ports ();
275
- auto output_ports_lower = loop_info_lower->get_output_ports ();
275
+ const auto & output_ports_lower = loop_info_lower->get_output_ports ();
276
276
fuse_loop_ports (output_ports_upper, input_ports_lower, loop_id_upper);
277
277
278
278
const auto & from = fuse_into_upper ? loop_id_lower : loop_id_upper;
@@ -285,9 +285,9 @@ void LoopManager::fuse_loops(LinearIR::constExprIt loop_begin_target, LinearIR::
285
285
const auto handlers = SpecificIterationHandlers::merge_handlers (loop_info_upper->get_handlers (), loop_info_lower->get_handlers ());
286
286
const auto is_work_amount_const = loop_info_upper->is_work_amount_const () || loop_info_lower->is_work_amount_const ();
287
287
288
- auto new_entries = input_ports_upper;
288
+ auto new_entries = std::move ( input_ports_upper) ;
289
289
new_entries.insert (new_entries.end (), input_ports_lower.begin (), input_ports_lower.end ());
290
- auto new_exits = output_ports_upper;
290
+ auto new_exits = std::move ( output_ports_upper) ;
291
291
new_exits.insert (new_exits.end (), output_ports_lower.begin (), output_ports_lower.end ());
292
292
293
293
m_map[to] = std::make_shared<UnifiedLoopInfo>(work_amount, increment, new_entries, new_exits, handlers, is_work_amount_const);
0 commit comments