[LLVMdev] Custom AA implementation is not used

Julian Oppermann oppermann at esa.informatik.tu-darmstadt.de
Wed May 15 05:43:00 PDT 2013

Am 03.05.2013 20:02, schrieb Nick Lewycky:
> 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;
>      }

Yes, this was the missing piece. Thank you!


More information about the llvm-dev mailing list