[RFC] Improving alias dumps
Richard Biener
richard.guenther@gmail.com
Mon Oct 26 13:35:00 GMT 2015
On Mon, Oct 26, 2015 at 1:26 PM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> Hi,
>
> After spending some time looking at ealias/pta dumps, I realized that
> they're hard to understand because we use varinfo names to identify
> varinfos, while those names are not necessarily unique.
>
> F.i., for a function f:
> ...
> void
> f (int *__restrict__ a, int *__restrict__ b)
> {
> *a = 1;
> *b = 2;
> }
> ...
>
> we have at ealias the constraints:
> ...
> a = &PARM_NOALIAS
> PARM_NOALIAS = NONLOCAL
> b = &PARM_NOALIAS
> PARM_NOALIAS = NONLOCAL
> derefaddrtmp = &NONLOCAL
> *a = derefaddrtmp
> derefaddrtmp = &NONLOCAL
> *b = derefaddrtmp
> ...
> F.i. PARM_NOALIAS occurs several times, and it's not clear if there are one
> or two varinfos with that name.
>
> Using attached patch, it's clearer what varinfos the constraints relate to:
> ...
> a(8) = &PARM_NOALIAS(9)
> PARM_NOALIAS(9) = NONLOCAL(5)
> b(10) = &PARM_NOALIAS(11)
> PARM_NOALIAS(11) = NONLOCAL(5)
> derefaddrtmp(12) = &NONLOCAL(5)
> *a(8) = derefaddrtmp(12)
> derefaddrtmp(13) = &NONLOCAL(5)
> *b(10) = derefaddrtmp(13)
> ...
>
> It this a good idea, f.i. guarded by (dump_flags & TDF_DETAILS) not to
> disturb scans of current tests?
>
> Or, do we f.i. want to fix the names themselves to be unique?
I think so, on most cases the (n) adds clutter without extra info.
Richard.
>
> Thanks,
> - Tom
More information about the Gcc-patches
mailing list