[LLVMdev] Custom AA implementation is not used

Nick Lewycky nicholas at mxc.ca
Fri May 3 11:02:39 PDT 2013


Julian Oppermann wrote:
> Hello LLVM devs,
>
> I'm trying to write my own alias analysis that only contributes
> information to the getModRefBehavior query, and should be in its own
> library loadable by opt.
>
> However, even though my pass is run (and executed immediately before the
> client pass that is calling AA.doesNotAccessMemory(F)), the queries
> never reach my implementation. What am I missing?

You don't provide an implementation of getAdjustedAnalysisPointer. This 
is a stab in the dark, but try adding that? Something like:

     virtual void *getAdjustedAnalysisPointer(const void *ID) {
       if (ID == &AliasAnalysis::ID)
         return (AliasAnalysis*)this;
       return this;
     }

Nick



More information about the llvm-dev mailing list