Lines Matching defs:loop

1106       gfc_loopinfo loop;
1128 /* Build the body of the loop. */
1132 /* Build the loop and return. */
1133 gfc_init_loopinfo (&loop);
1134 loop.dimen = 1;
1135 loop.from[0] = gfc_index_zero_node;
1136 loop.loopvar[0] = index;
1137 loop.to[0] = nelems;
1138 gfc_trans_scalarizing_loops (&loop, &loopbody);
1140 gfc_add_block_to_block (&ifbody, &loop.pre);
1147 /* Build the body of the loop. */
1151 /* Build the loop and return. */
1152 gfc_init_loopinfo (&loop);
1153 loop.dimen = 1;
1154 loop.from[0] = gfc_index_zero_node;
1155 loop.loopvar[0] = index;
1156 loop.to[0] = nelems;
1157 gfc_trans_scalarizing_loops (&loop, &loopbody);
1159 gfc_add_block_to_block (&ifbody, &loop.pre);
1175 gfc_cleanup_loop (&loop);
1449 /* Copy the scalarization loop variables. */
1455 dest->loop = src->loop;
1499 /* If we were in a nested loop, the next scalarized expression can be
4065 the loop rather than being outside it, as originally. */
4149 gfc_loopinfo loop;
4170 gfc_init_loopinfo (&loop);
4171 gfc_add_ss_to_loop (&loop, rss);
4174 gfc_conv_ss_startstride (&loop);
4188 loop.temp_ss = gfc_get_temp_ss (base_type, ((expr->ts.type == BT_CHARACTER)
4191 loop.dimen);
4193 parmse->string_length = loop.temp_ss->info->string_length;
4195 /* Associate the SS with the loop. */
4196 gfc_add_ss_to_loop (&loop, loop.temp_ss);
4199 gfc_conv_loop_setup (&loop, &expr->where);
4202 info = &loop.temp_ss->info->data.array;
4206 gfc_copy_loopinfo_to_se (&lse, &loop);
4207 gfc_copy_loopinfo_to_se (&rse, &loop);
4210 lse.ss = loop.temp_ss;
4212 gfc_mark_ss_chain_used (loop.temp_ss, 1);
4214 /* Start the scalarized loop body. */
4215 gfc_start_scalarized_body (&loop, &body);
4220 /* Reset the offset for the function call since the loop
4222 comes first in the loop chain since it is added second. */
4225 tmp = loop.ss->loop_chain->info->data.array.descriptor;
4226 gfc_conv_descriptor_offset_set (&loop.pre, tmp,
4237 gfc_trans_scalarizing_loops (&loop, &body);
4242 all the loop declarations into the current context. */
4243 for (n = 0; n < loop.dimen; n++)
4246 body = loop.code[loop.order[n]];
4251 /* Add the post block after the second loop, so that any
4253 gfc_add_block_to_block (&parmse->pre, &loop.pre);
4262 rse.ss = loop.temp_ss;
4271 /* Skip the write-out loop for this case. */
4285 gfc_mark_ss_chain_used (loop.temp_ss, 1);
4288 scalarized loop body. */
4292 /* Build the offsets for the temporary from the loop variables. The
4295 outside the innermost loop, so the overall transfer could be
4303 tmp = rse.loop->loopvar[n];
4305 tmp, rse.loop->from[n]);
4311 rse.loop->to[n-1], rse.loop->from[n-1]);
4322 tmp_index, rse.loop->from[0]);
4323 gfc_add_modify (&rse.loop->code[0], offset, tmp_index);
4327 rse.loop->loopvar[0], offset);
4347 /* Wrap the whole thing up by adding the second loop to the post-block
4348 and following it by the post-block of the first loop. In this way,
4358 gfc_add_block_to_block (&parmse->post, &loop.post);
4360 gfc_cleanup_loop (&loop);
4395 rse.loop->to[n], rse.loop->from[n]);
4564 gcc_assert (se->loop != NULL);
4715 /* An elemental function inside a scalarized loop. */
5668 tmp = gfc_alloc_allocatable_for_assignment (se->loop,
5682 gcc_assert (se->loop && info);
5686 gcc_assert (se->ss->dimen == se->loop->dimen);
5717 gcc_assert (se->loop && info);
5721 gcc_assert (se->ss->dimen == se->loop->dimen);
5980 && se->ss && se->ss->loop)
5988 if (se->ss && se->ss->loop)
5990 se->expr = gfc_evaluate_now (se->expr, &se->ss->loop->pre);
5995 for (n = 0; n < se->ss->loop->dimen; n++)
5998 se->ss->loop->to[n] = gfc_conv_descriptor_ubound_get (tmp, dim);
5999 se->ss->loop->from[n] = gfc_conv_descriptor_lbound_get (tmp, dim);
6029 if (se->ss && se->ss->loop)
6031 gfc_add_expr_to_block (&se->ss->loop->post, tmp);
6033 gfc_add_expr_to_block (&se->ss->loop->post, tmp);
6057 stmtblock_t block, loop;
6069 /* Otherwise, we use a loop:
6085 gfc_init_block (&loop);
6093 gfc_add_expr_to_block (&loop, tmp);
6096 gfc_add_modify (&loop,
6100 /* Increment loop variables. */
6101 gfc_add_modify (&loop, i,
6104 gfc_add_modify (&loop, el,
6108 /* Making the loop... actually loop! */
6109 tmp = gfc_finish_block (&loop);
6573 gfc_loopinfo loop;
6580 gfc_init_loopinfo (&loop);
6610 /* Associate the SS with the loop. */
6611 gfc_add_ss_to_loop (&loop, lss);
6612 gfc_add_ss_to_loop (&loop, rss);
6615 gfc_conv_ss_startstride (&loop);
6618 gfc_conv_loop_setup (&loop, &expr->where);
6621 gfc_copy_loopinfo_to_se (&lse, &loop);
6622 gfc_copy_loopinfo_to_se (&rse, &loop);
6629 /* Start the scalarized loop body. */
6630 gfc_start_scalarized_body (&loop, &body);
6644 gfc_trans_scalarizing_loops (&loop, &body);
6647 gfc_add_block_to_block (&block, &loop.pre);
6648 gfc_add_block_to_block (&block, &loop.post);
6652 gfc_cleanup_loop (&loop);
7318 loop. */
7451 /* Returns a reference to the scalar evaluated outside the loop
8018 of the loop, store it into a temporary variable, and assign from that.
8280 /* Provide the loop info so that the lhs descriptor can be built for
8285 gfc_loopinfo *loop)
8290 gfc_init_loopinfo (loop);
8291 gfc_add_ss_to_loop (loop, *ss);
8292 gfc_add_ss_to_loop (loop, se->ss);
8293 gfc_conv_ss_startstride (loop);
8294 gfc_conv_loop_setup (loop, where);
8295 gfc_copy_loopinfo_to_se (se, loop);
8296 gfc_add_block_to_block (&se->pre, &loop->pre);
8297 gfc_add_block_to_block (&se->pre, &loop->post);
8421 gfc_loopinfo loop;
8475 realloc_lhs_loop_for_fcn_call (&se, &expr1->where, &ss, &loop);
8486 gfc_cleanup_loop (&loop);
8999 gfc_loopinfo loop;
9041 gfc_init_loopinfo (&loop);
9049 /* Associate the SS with the loop. */
9050 gfc_add_ss_to_loop (&loop, lss);
9051 gfc_add_ss_to_loop (&loop, rss);
9054 gfc_conv_ss_startstride (&loop);
9055 /* Enable loop reversal. */
9057 loop.reverse[n] = GFC_ENABLE_REVERSE;
9059 gfc_conv_resolve_dependencies (&loop, lss, rss);
9061 gfc_conv_loop_setup (&loop, &expr2->where);
9064 gfc_copy_loopinfo_to_se (&lse, &loop);
9065 gfc_copy_loopinfo_to_se (&rse, &loop);
9069 if (loop.temp_ss == NULL)
9076 lse.ss = loop.temp_ss;
9078 gfc_mark_ss_chain_used (loop.temp_ss, 3);
9084 && loop.temp_ss == NULL)
9090 /* Start the scalarized loop body. */
9091 gfc_start_scalarized_body (&loop, &body);
9096 l_is_temp = (lss != gfc_ss_terminator && loop.temp_ss != NULL);
9153 gfc_trans_runtime_check (true, false, cond, &loop.pre,
9172 gfc_prepend_expr_to_block (&loop.post, tmp);
9181 whose allocation must go to the innermost loop. */
9203 gfc_add_block_to_block (&loop.post, &rse.post);
9229 gfc_trans_scalarized_loop_boundary (&loop, &body);
9234 gfc_copy_loopinfo_to_se (&lse, &loop);
9235 gfc_copy_loopinfo_to_se (&rse, &loop);
9237 rse.ss = loop.temp_ss;
9264 tmp = gfc_alloc_allocatable_for_assignment (&loop, expr1, expr2);
9266 gfc_add_expr_to_block (&loop.code[expr1->rank - 1], tmp);
9273 gfc_trans_scalarizing_loops (&loop, &body);
9276 gfc_add_block_to_block (&block, &loop.pre);
9277 gfc_add_block_to_block (&block, &loop.post);
9279 gfc_cleanup_loop (&loop);