Assertion `AA && "AA didn't call InitializeAliasAnalysis in its run method!"' failed.

Hello all,

I am working with someone else's LLVM code, which is about 8 months old.
Part of this pass involves AliasAnalysis, and I'm getting the above
assertion when the pass completes.

The dump is as follows:

I realize this must have sounded like a trivial question to you all, but I
really do sincerely need help with this...

I'm not sure how to call InitializeAliasAnalysis in my runOnFunction method
since it needs a Pass* as its parameter. See below for details.

Thank you!
-Griffin Wright

Hello all,

I am working with someone else's LLVM code, which is about 8 months old.
Part of this pass involves AliasAnalysis, and I'm getting the above
assertion when the pass completes.

The dump is as follows:
--------------------------------
Program received signal SIGABRT, Aborted.
0xf7fdf430 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fdf430 in __kernel_vsyscall ()
#1 0xf602e921 in *__GI_raise (sig=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2 0xf6031d52 in *__GI_abort () at abort.c:92
#3 0xf6027788 in *__GI___assert_fail (assertion=0xf78ef62c "AA && \"AA
didn't call InitializeAliasAnalysis in its run method!\"",
    file=0xf78ef5f0
"/x/grwright/llvm/llvm-2.9/lib/Analysis/AliasAnalysis.cpp", line=59,
function=0xf78f0e40 "virtual void
llvm::AliasAnalysis::deleteValue(llvm::Value*)") at assert.c:81
#4 0xf6c37686 in llvm::AliasAnalysis::deleteValue (this=0x81848d0,
V=0x8147000) at

/x/grwright/llvm/llvm-2.9/lib/Analysis/AliasAnalysis.cpp:59

#5 0xf6c47153 in llvm::AliasSetTracker::deleteValue (this=0x823ab58,
PtrVal=0x8147000) at
/x/grwright/llvm/llvm-2.9/lib/Analysis/AliasSetTracker.cpp:505
#6 0xf6c47ae6 in llvm::AliasSetTracker::ASTCallbackVH::deleted
(this=0x8233ce8) at
/x/grwright/llvm/llvm-2.9/lib/Analysis/AliasSetTracker.cpp:619
#7 0xf72b9d2f in llvm::ValueHandleBase::ValueIsDeleted (V=0x8147000) at
/x/grwright/llvm/llvm-2.9/lib/VMCore/Value.cpp:557
#8 0xf72b81ec in ~Value (this=0x8147000, __in_chrg=<value optimized
)
at /x/grwright/llvm/llvm-2.9/lib/VMCore/Value.cpp:60
#9 0xf6f4b041 in ~User (this=0x8147000, __in_chrg=<value optimized out>)
at /x/grwright/llvm/llvm-2.9/include/llvm/User.h:62
#10 0xf725dd89 in ~Instruction (this=0x8147000, __in_chrg=<value

optimized

>) at /x/grwright/llvm/llvm-2.9/lib/VMCore/Instruction.cpp:54
#11 0xf7275461 in ~GetElementPtrInst (this=0x8147000, __in_chrg=<value
optimized out>) at
/x/grwright/llvm/llvm-2.9/include/llvm/Instructions.h:285
#12 0xf7136671 in llvm::ilist_node_traits<llvm::Instruction>::deleteNode
(V=0x8147000) at /x/grwright/llvm/llvm-2.9/include/llvm/ADT/ilist.h:112
#13 0xf7135c80 in llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction> >::erase (this=0x8145d14,

where=...)

at /x/grwright/llvm/llvm-2.9/include/llvm/ADT/ilist.h:463
#14 0xf71c7c37 in llvm::iplist<llvm::Instruction,
llvm::ilist_traits<llvm::Instruction> >::erase (this=0x8145d14,

first=...,