This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problems in IPA passes
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>, gcc at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Date: Mon, 30 Oct 2017 21:44:24 -0600
- Subject: Re: Problems in IPA passes
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com ECD01BDCD
- References: <efc0a48d-d4ae-62e7-33a6-8cba5b126c09@redhat.com> <12C3E84A-CD73-4D9A-A45E-FC5EEBB2B83D@gmail.com>
On 10/28/2017 11:18 AM, Richard Biener wrote:
> On October 28, 2017 9:28:38 AM GMT+02:00, Jeff Law <law@redhat.com> wrote:
>>
>> Jan,
>>
>> What's the purpose behind calling vrp_meet and
>> extract_range_from_unary_expr from within the IPA passes?
>>
>> AFAICT that is not safe to do. Various paths through those routines
>> will access static objects within tree-vrp.c which may not be
>> initialized when IPA runs (vrp_equiv_obstack, vr_value).
>>
>> While this seems to be working today, it's a failure waiting to happen.
>
> Those functions are fine to use IIRC.
You have to look at how they interact with those global variables within
tree-vrp.c They're complex enough that I can't convince myself they're
actually safe. And even if they're safe today, the lack of
encapsulation makes them ripe to be broken later by accident.
Jeff