On Wed, Oct 28, 2015 at 1:04 PM, Tom de Vries <tom_devr...@mentor.com> wrote: > On 26/10/15 14:29, Richard Biener wrote: >> >> On Mon, Oct 26, 2015 at 1:26 PM, Tom de Vries <tom_devr...@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. >> > > Attached patch implements that approach. We get: > > a = &PARM_NOALIAS(9) > PARM_NOALIAS(9) = NONLOCAL > b = &PARM_NOALIAS(11) > PARM_NOALIAS(11) = NONLOCAL > derefaddrtmp(12) = &NONLOCAL > *a = derefaddrtmp(12) > derefaddrtmp(13) = &NONLOCAL > *b = derefaddrtmp(13) > > OK for trunk if bootstrap and reg-test succeeds?
Ok. Richard. > Thanks, > - Tom >