This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Check NULL loop->latch in verify_loop_structure
- From: Richard Biener <rguenther at suse dot de>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Mon, 23 Nov 2015 11:28:19 +0100 (CET)
- Subject: Re: [PATCH] Check NULL loop->latch in verify_loop_structure
- Authentication-results: sourceware.org; auth=none
- References: <56524E0D dot 7000203 at mentor dot com>
On Mon, 23 Nov 2015, Tom de Vries wrote:
> Hi,
>
> In verify_loop_structure, we stop checking the latch once we find that it's
> NULL.
>
> This patch tries a bit harder:
> - if !LOOPS_MAY_HAVE_MULTIPLE_LATCHES, we don't allow a NULL latch
> - if LOOPS_MAY_HAVE_MULTIPLE_LATCHES, we check that indeed there's no
> single loop latch.
>
> As a consequence of adding this check, I needed to fix expand_omp_for_generic,
> which missed an initialization of a loop latch.
>
> Bootstrapped and reg-tested on x86_64.
>
> OK for stage3 trunk?
You miss to catch the case where loop->latch is non-NULL but there
are multiple latches, so I think the patch can be improved.
That case is more important for correctness (passes
seeing ->latch non-NULL assume a single latch).
Thanks,
Richard.
> Thanks,
> - Tom
>
--
Richard Biener <rguenther@suse.de>
SUSE LINUX GmbH, GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg)