This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problems in IPA passes
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: gcc at gcc dot gnu dot org,Jeff Law <law at redhat dot com>,Jan Hubicka <jh at suse dot cz>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Sat, 28 Oct 2017 19:18:21 +0200
- Subject: Re: Problems in IPA passes
- Authentication-results: sourceware.org; auth=none
- References: <efc0a48d-d4ae-62e7-33a6-8cba5b126c09@redhat.com>
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.
>Is there any way you can avoid using those routines? I can't believe
>you really need all the complexity of those routines, particularly
>extract_range_from_unary_expr. Plus it's just downright fugly from a
>modularity standpoint.
The functions were designed to be workers for ranges like const_binop so they were supposed to be used elsewhere. Which is also why I wondered Andrew didn't use them...
Richard.
>
>?
>
>Jeff