Skip to content

Commit

Permalink
[onert] Use getUses() reference (Samsung#13803)
Browse files Browse the repository at this point in the history
This commit updates to use getUses() return's reference explicitly.

ONE-DCO-1.0-Signed-off-by: Hyeongseok Oh <[email protected]>
  • Loading branch information
hseok-oh authored Aug 28, 2024
1 parent cc3e6b4 commit 96039fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void TrainableConstantInsertionPass::callback(const ir::OperationIndex &node_ind
continue;

// Insert new operands for shared constant except for the current node.
const auto uses = object.getUses();
const auto &uses = object.getUses();
for (const auto &use_index : uses)
{
if (use_index == node_index)
Expand Down
2 changes: 1 addition & 1 deletion runtime/onert/core/src/ir/train/UseDefGenerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void UseDefGenerator::initForForwardingNodes()
}

assert(_training_usedefs.at(forwarding_operand_index).getTrainingUses().size() == 0);
const auto uses = operand.getUses();
const auto &uses = operand.getUses();
for (const auto &use : uses)
insertUse(forwarding_operand_index, TrainingOperationIndex{use, is_forward});
});
Expand Down

0 comments on commit 96039fc

Please sign in to comment.