This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problems in IPA passes
- From: Kugan Vivekanandarajah <kugan dot vivekanandarajah at linaro dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, GCC <gcc at gcc dot gnu dot org>
- Date: Mon, 30 Oct 2017 08:54:00 +1100
- Subject: Re: Problems in IPA passes
- Authentication-results: sourceware.org; auth=none
- References: <efc0a48d-d4ae-62e7-33a6-8cba5b126c09@redhat.com>
Hi Jeff,
On 28 October 2017 at 18:28, 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?
This is used such that when we have an argument to a function and this
for which we know the VR and this intern is passed as a parameter to
another. For example:
void foo (int i)
{
...
bar (unary_op (i))
...
}
This is mainly to share what is done in tree-vrp.
>
> 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).
IPA-VRP does not track equivalence and vr_value is not used.
Thanks,
Kugan
>
> While this seems to be working today, it's a failure waiting to happen.
>
> 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.
>
>
> ?
>
> Jeff