This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Graphite cannot handle return stmt
- From: Sebastian Pop <sebpop at gmail dot com>
- To: Aditya Kumar <hiraditya at msn dot com>, Tobias Grosser <tobias at grosser dot es>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 29 Jun 2015 19:12:38 -0500
- Subject: Re: [PATCH] Graphite cannot handle return stmt
- Authentication-results: sourceware.org; auth=none
- References: <1435611532-31080-1-git-send-email-hiraditya at msn dot com>
On Mon, Jun 29, 2015 at 3:58 PM, Aditya Kumar <hiraditya@msn.com> wrote:
> No regressions.
>
> 2015-06-29 Aditya Kumar <aditya.k7@samsung.com>
> Sebastian Pop <s.pop@samsung.com>
>
> * graphite-scop-detection.c (stmt_simple_for_scop_p): Bail out in case of a return statement.
Looks good to me.
Tobi, do you see a good reason not to cut scops at return stmts?
Thanks,
Sebastian
>
> ---
> gcc/graphite-scop-detection.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
> index e8ddecd..a10702e 100644
> --- a/gcc/graphite-scop-detection.c
> +++ b/gcc/graphite-scop-detection.c
> @@ -365,6 +365,8 @@ stmt_simple_for_scop_p (basic_block scop_entry, loop_p outermost_loop,
> switch (gimple_code (stmt))
> {
> case GIMPLE_RETURN:
> + return false;
> +
> case GIMPLE_LABEL:
> return true;
>
> --
> 2.1.0.243.g30d45f7
>