This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Check NULL loop->latch in verify_loop_structure


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]