Thanks for your comments.
The corrent name for this patch should be "nystrom alias analysis inline
support"
Currently when inline callee into caller, constraint graph nodes in callee
is mapped into caller without modification.
These constraint graph nodes' points to info is too conservertive in its
caller function, because the analysis result in callee is computed for all
callsite.
This patch is try to recompute callee constraint graph nodes' points to set
when it's inlined at a specified callsite.
As show in the above example.
2011/2/1 Suneel Jain <suneel.j...@gmail.com>
> I would like to echo Sun's comments. Please write a
> design document that describes your enhancement
> and send it out.
>
> Also, today is the last day for unrestricted checkins
> before we enter "only bug fixes" mode in preparation
> for the 4.2.4 release. So, I would suggest either
> waiting to checkin your change or to checkin into
> a branch.
>
> - Suneel
>
>
>
> On Sun, Jan 30, 2011 at 9:48 PM, Sun Chan <sun.c...@gmail.com> wrote:
> > this change is quite large. Other than the obvious cosmetic issues
> > like "random spacing", bad variable names like "sentive", there is not
> > much a gatekeeper can do. Also, the IPA already does call site
> > specific inlining, and you are introducing a new term context
> > sensitive inlining, not sure what you meant. Please clarify.
> > I suggest (if you haven't done so already) a code/design review
> > instead of this code review request
> > Sun
> >
> > On Mon, Jan 31, 2011 at 12:38 PM, Hui Shi <kalin....@gmail.com> wrote:
> >> Hi folks,
> >>
> >>
> >>
> >> This is a patch for nystrom alias analysis, solve points to when inline
> >> happens.
> >>
> >> Can gatekeeper help check this patch?
> >>
> >>
> >>
> >> Current nystrom points to analysis is context insensitive, field
> sensitive
> >> and performed before inline during IPA.
> >>
> >> (nystrom is supposed to context sensitive finally)
> >>
> >> The problem found in following example is, after inline bar into foo1
> and
> >> foo2, p, q's copy in both foo1 and foo2 still points to both a and b.
> >>
> >>
> >>
> >> int a, b;
> >>
> >> int c;
> >>
> >>
> >>
> >> int foo1()
> >>
> >> {
> >>
> >> int *m;
> >>
> >> bar(m, &a);
> >>
> >> *m += a;
> >>
> >> *m += b;
> >>
> >> return *m;
> >>
> >> }
> >>
> >>
> >>
> >> int foo2()
> >>
> >> {
> >>
> >> int *n;
> >>
> >> bar(n, &b);
> >>
> >> *n += a;
> >>
> >> *n += b;
> >>
> >> return *n;
> >>
> >> }
> >>
> >>
> >>
> >> void bar(int *p, int *q)
> >>
> >> {
> >>
> >> *q = c;
> >>
> >> *p = q;
> >>
> >> }
> >>
> >>
> >>
> >> Because nystrom happens before inline, in bar function, p and q’s cg
> node
> >> still points to both a and b.
> >>
> >> After inline bar into foo1 and foo2, p and q's dereference WN node's
> >> constraint graph node still points to both a and b.
> >>
> >> They needs to be updated accordingly to get better points to accuracy.
> >>
> >> This patch add context sensitive inline to handle this problem.
> >>
> >> 1. When inline process formals, check if actual's points to set is
> >> accurate than formal's points to set. If so, clone formal's cg node in
> >> caller, update with actual's point to set.
> >>
> >> 2. After finish processing all formals, solve the nodes in callee
> >> constraint graph , the initial work set is all formals updated in step1.
> >>
> >> No need propagate the updated points to back to caller (like propagate p
> >> points to a, back to m only points to a), because nystrom context
> sensitive
> >> will handle this.
> >>
> >>
> >>
> >> In context insensitive analysis (current implementation), m and n’s
> >> constraint graph node in foo1 and foo2 will points to a and b, because
> in
> >> bar p is assigned both a and b.
> >>
> >> Context sensitive analysis will summarize bar’s side effect <*p = q>, *q
> = c
> >> is not pointer update, will not affect the points to info.
> >>
> >> when analyze foo1 and foo2 use this summary, foo1 knows m points to a,
> in
> >> foo2, knows n points2 to b.
> >>
> >> But context sensitive can't solve this problem.
> >>
> >>
> >>
> >> Best Regards
> >>
> >> Shi, Hui
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> >> Finally, a world-class log management solution at an even better
> price-free!
> >> Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> >> February 28th, so secure your free ArcSight Logger TODAY!
> >> http://p.sf.net/sfu/arcsight-sfd2d
> >> _______________________________________________
> >> Open64-devel mailing list
> >> Open64-devel@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/open64-devel
> >>
> >>
> >
> >
> ------------------------------------------------------------------------------
> > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> > Finally, a world-class log management solution at an even better
> price-free!
> > Download using promo code Free_Logger_4_Dev2Dev. Offer expires
> > February 28th, so secure your free ArcSight Logger TODAY!
> > http://p.sf.net/sfu/arcsight-sfd2d
> > _______________________________________________
> > Open64-devel mailing list
> > Open64-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/open64-devel
> >
>
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel