First time posting to llvmdev, be gentle :).
I'm working on an AliasAnalysis implementation and running into an
issue on 2.7, that doesn't exist in 2.6 as far as I can tell.
Short version: has anyone been able to load an AliasAnalysis module
into 2.7's opt?
Even with a dummy pass implementation (just returns MayAlias for
everything), I'm getting very strange behavior:
All calls to FooAA::alias go to FooAA::print, resulting in
understandably painful failure thereafter, generally a segfault.
Example stack trace:
==25630== by 0xB2752F: llvm::Pass::print(llvm::raw_ostream&,
llvm::Module const*) const (Pass.cpp:94)
==25630== by 0x9B2769:
unsigned long, bool, llvm::ilist_iterator<llvm::Instruction>,
And the related lines from MemDep:
282 if (AccessPtr == Inst ||
283 AA->alias(Inst, 1, AccessPtr, 1) == AliasAnalysis::MustAlias)
The way I make this happen is to run:
opt -load fooAA.so -foo-aa -dse
(where "-foo-aa" is the AA pass defined in the module fooAA.so, and
dse makes use of the aa results through memdep)
Finally a short bit about my build env: GCC 4.4.3, Debug build, Linux x86_64.
I'd be happy to provide any more information required/desired, but
hopefully that covers the basics.
Any thoughts? Is this a bug, or am I potentially doing something silly?
Thanks for your time,