On Wed, Jun 17, 2026 at 8:26 AM <[email protected]> wrote:
>
> From: Dhruv Chawla <[email protected]>
>
> The can_be_parallel flag was not being streamed out, so any frontend
> setting the flag (via annot_expr_parallel_kind) would not observe it doing
> anything when LTO was enabled.
>
> Bootstrapped and regtested on aarch64-linux-gnu.

OK.

> Signed-off-by: Dhruv Chawla <[email protected]>
>
> gcc/ChangeLog:
>
>         PR fortran/125717
>         * lto-streamer-in.cc (input_cfg): Stream loop->can_be_parallel in.
>         * lto-streamer-out.cc (output_cfg): Stream loop->can_be_parallel out.
> ---
>  gcc/lto-streamer-in.cc  | 1 +
>  gcc/lto-streamer-out.cc | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/gcc/lto-streamer-in.cc b/gcc/lto-streamer-in.cc
> index ee2fa2affbc..92f83ebbbb0 100644
> --- a/gcc/lto-streamer-in.cc
> +++ b/gcc/lto-streamer-in.cc
> @@ -1140,6 +1140,7 @@ input_cfg (class lto_input_block *ib, class data_in 
> *data_in,
>        loop->dont_vectorize = streamer_read_hwi (ib);
>        loop->force_vectorize = streamer_read_hwi (ib);
>        loop->finite_p = streamer_read_hwi (ib);
> +      loop->can_be_parallel = streamer_read_hwi (ib);
>        loop->simduid = stream_read_tree (ib, data_in);
>
>        place_new_loop (fn, loop);
> diff --git a/gcc/lto-streamer-out.cc b/gcc/lto-streamer-out.cc
> index f2feefc1532..87f9612b3d7 100644
> --- a/gcc/lto-streamer-out.cc
> +++ b/gcc/lto-streamer-out.cc
> @@ -2220,6 +2220,7 @@ output_cfg (struct output_block *ob, struct function 
> *fn)
>        streamer_write_hwi (ob, loop->dont_vectorize);
>        streamer_write_hwi (ob, loop->force_vectorize);
>        streamer_write_hwi (ob, loop->finite_p);
> +      streamer_write_hwi (ob, loop->can_be_parallel);
>        stream_write_tree (ob, loop->simduid, true);
>      }
>
> --
> 2.43.0
>

Reply via email to