[PATCH] NoAA does not initialize TargetLibraryInfo
Hal Finkel
hfinkel at anl.gov
Mon Jun 30 16:36:15 PDT 2014
----- Original Message -----
> From: "Tobias Güntner" <guentner at rbg.informatik.tu-darmstadt.de>
> To: "llvm-commits" <llvm-commits at cs.uiuc.edu>
> Sent: Tuesday, May 27, 2014 4:03:30 PM
> Subject: Re: [PATCH] NoAA does not initialize TargetLibraryInfo
>
> Hi!
>
> Am 27.05.2014 19:38, schrieb Hal Finkel:
> > void AliasAnalysis::InitializeAliasAnalysis(Pass *P) {
> >
> > - TD = P->getAnalysisIfAvailable<DataLayout>();
> >
> > - TLI = P->getAnalysisIfAvailable<TargetLibraryInfo>();
> >
> > AA = &P->getAnalysis<AliasAnalysis>();
> >
> > + // See NoAA::initializePass()
> >
> > + TD = AA->TD;
> >
> > + TLI = AA->TLI;
> >
> > }
> >
> > This I don't understand. Why are you making this change?
>
> Both methods are almost identical. I wanted to remove duplicate code,
> but I didn't want to create yet another initialization method just
> for that.
>
> > Won't it make AA crash if there are no AA providers?
>
> No, because of the way alias analyses are chained. NoAA is the
> default
> AliasAnalysis; all others call AU.addRequired<AliasAnalysis>().
Okay, fair enough. Could you please rebase this so that it can be committed?
Thanks again,
Hal
>
> Regards,
> Tobias
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list