[PATCH] Improve verification of loop->latch in verify_loop_structure

Tom de Vries Tom_deVries@mentor.com
Tue Nov 24 15:19:00 GMT 2015


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

On 23/11/15 11:28, Richard Biener wrote:
> 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).
>

Updated according to comment.

Bootstrapped and reg-tested on x86_64.

OK for stage3 trunk?

Thanks,
- Tom


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Improve-verification-of-loop-latch-in-verify_loop_structure.patch
Type: text/x-patch
Size: 3847 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151124/ce0664ea/attachment.bin>


More information about the Gcc-patches mailing list