[llvm-commits] [PATCH] Optimistically analyse phi cycles in BasicAA
Hal Finkel
hfinkel at anl.gov
Sat Dec 8 10:12:56 PST 2012
Nick,
You had okayed the previous version of this. Would you like to look at this one as well?
-Hal
----- Original Message -----
> From: "Dan Gohman" <dan433584 at gmail.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Arnold Schwaighofer" <arnold.schwaighofer at gmail.com>, "Commit Messages and Patches for LLVM"
> <llvm-commits at cs.uiuc.edu>
> Sent: Thursday, December 6, 2012 4:32:32 PM
> Subject: Re: [llvm-commits] [PATCH] Optimistically analyse phi cycles in BasicAA
>
> The basic idea sounds fine.
>
> Dan
>
> On Thu, Dec 6, 2012 at 9:31 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> > Dan,
> >
> > Do you have an opinion on this?
> >
> > Thanks again,
> > Hal
> >
> > ----- Original Message -----
> >> From: "Arnold Schwaighofer" <arnold.schwaighofer at gmail.com>
> >> Cc: "Commit Messages and Patches for LLVM"
> >> <llvm-commits at cs.uiuc.edu>
> >> Sent: Wednesday, November 21, 2012 9:24:13 AM
> >> Subject: Re: [llvm-commits] [PATCH] Optimistically analyse phi
> >> cycles in BasicAA
> >>
> >> Also send to list ...
> >>
> >> On Wed, Nov 21, 2012 at 3:37 AM, Duncan Sands <baldrick at free.fr>
> >> wrote:
> >> >
> >> > what happens if the recursion bails out due to hitting a
> >> > recursion
> >> > limit?
> >> > Will the conservatively correct MayAlias be returned in that
> >> > case?
> >>
> >> Yes, because when we hit the limit in the recursion we return
> >> MayAlias
> >> from this recursion. This result will be merged with the phi's
> >> alias
> >> result, setting the phi to MayAlias.
> >>
> >> AliasResult Alias = NoAlias;
> >> AliasResult OrigAliasResult = AliasCache[Locs]; // Is
> >> MayAlias
> >> if we have never seen this node.
> >> AliasCache[Locs] = NoAlias;
> >>
> >> for (unsigned i = 0, e = PN->getNumIncomingValues(); i != e;
> >> ++i) {
> >> AliasResult ThisAlias =
> >> [1]
> >> aliasCheck(PN->getIncomingValue(i), PNSize, PNTBAAInfo,
> >> PN2->getIncomingValueForBlock(PN->getIncomingBlock(i)),
> >> V2Size, V2TBAAInfo);
> >> Alias = MergeAliasResults(ThisAlias, Alias);
> >> if (Alias == MayAlias)
> >> break;
> >> }
> >>
> >> // Reset if speculation failed.
> >> if (Alias != NoAlias)
> >> AliasCache[Locs] = OrigAliasResult;
> >>
> >> We either process all nodes in the phis' input graph and
> >> eventually
> >> see a MayAlias result or we give up early and return MayAlias
> >> through
> >> the recursion.
> >> The interesting case when we handle two phi nodes. We assume the
> >> phis
> >> to be NoAlias and they are not. Let say we process all inputs
> >> recursively then we eventually will see an input that is MayAlias,
> >> this will be propagate up to the call aliasCheck [1] above,
> >> resulting
> >> in the phi to be set to MayAlias.
> >> In the case were we hit the recursion limit this again will happen
> >> in
> >> the call to aliasCheck [1] which then returns MayAlias and again
> >> the
> >> phis' result will be reset to MayAlias.
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >>
> >
> > --
> > Hal Finkel
> > Postdoctoral Appointee
> > Leadership Computing Facility
> > Argonne National Laboratory
>
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list