This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Discard Scops for which entry==exit
- From: Sebastian Pop <sebpop at gmail dot com>
- To: Aditya Kumar <hiraditya at msn dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Tobias Grosser <tobias at grosser dot es>
- Date: Mon, 29 Jun 2015 19:09:30 -0500
- Subject: Re: [PATCH] Discard Scops for which entry==exit
- Authentication-results: sourceware.org; auth=none
- References: <1435608255-10186-1-git-send-email-hiraditya at msn dot com>
On Mon, Jun 29, 2015 at 3:04 PM, Aditya Kumar <hiraditya@msn.com> wrote:
> In this patch we discard the scops where entry and exit are the same BB.
> This is an effort to remove graphite-scop-detection.c:limit_scops.
> Removing the limit_scops function introduces correctness regressions.
> We are making relevant changes in incremental steps to fix those bugs,
> and finally we intend to remove limit_scops.
>
> 2015-06-29 Aditya Kumar <aditya.k7@samsung.com>
> Sebastian Pop <s.pop@samsung.com>
>
> * graphite-scop-detection.c (build_scops_1): Discard scops for which entry==exit
Looks good to me.
Let's wait on comments from Tobi before pushing this patch.
Thanks,
Sebastian
>
>
> ---
> gcc/graphite-scop-detection.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
> index e8ddecd..f57cc4a 100644
> --- a/gcc/graphite-scop-detection.c
> +++ b/gcc/graphite-scop-detection.c
> @@ -810,7 +810,14 @@ build_scops_1 (basic_block current, loop_p outermost_loop,
> {
> open_scop.exit = sinfo.exit;
> gcc_assert (open_scop.exit);
> - scops->safe_push (open_scop);
> + if (open_scop.entry != open_scop.exit)
> + scops->safe_push (open_scop);
> + else
> + {
> + sinfo.difficult = true;
> + sinfo.exits = false;
> + sinfo.exit = NULL;
> + }
> }
>
> result.exit = sinfo.exit;
> --
> 2.1.0.243.g30d45f7
>