@@ -144,7 +144,7 @@ bool IncrementalEvaluator::checkLoopBody() {
144144 // check loop counter cell
145145 bool loop_counter_updated = false ;
146146 for (const auto & op : simple_loop.body .ops ) {
147- const auto meta = Operation::Metadata::get (op.type );
147+ const auto & meta = Operation::Metadata::get (op.type );
148148 const auto target = op.target .value .asInt ();
149149 if (target == simple_loop.counter ) {
150150 if ((op.type == Operation::Type::SUB ||
@@ -224,7 +224,7 @@ void IncrementalEvaluator::computeStatefulCells() {
224224 std::set<int64_t > write;
225225 stateful_cells.clear ();
226226 for (const auto & op : simple_loop.body .ops ) {
227- const auto meta = Operation::Metadata::get (op.type );
227+ const auto & meta = Operation::Metadata::get (op.type );
228228 if (meta.num_operands == 0 ) {
229229 continue ;
230230 }
@@ -255,7 +255,7 @@ void IncrementalEvaluator::computeLoopCounterDependentCells() {
255255 while (changed) {
256256 changed = false ;
257257 for (const auto & op : simple_loop.body .ops ) {
258- const auto meta = Operation::Metadata::get (op.type );
258+ const auto & meta = Operation::Metadata::get (op.type );
259259 const auto target = op.target .value .asInt ();
260260 if (loop_counter_dependent_cells.find (target) !=
261261 loop_counter_dependent_cells.end ()) {
@@ -286,7 +286,7 @@ bool IncrementalEvaluator::checkPostLoop() {
286286 // by the post-loop fragment are output cells.
287287 std::set<int64_t > write;
288288 for (const auto & op : simple_loop.post_loop .ops ) {
289- const auto meta = Operation::Metadata::get (op.type );
289+ const auto & meta = Operation::Metadata::get (op.type );
290290 if (meta.num_operands < 1 ) {
291291 continue ;
292292 }
0 commit comments