[LLVMdev] writing an alias analysis pass?

Matthew O'Connor thegreendragon at gmail.com
Fri May 2 09:07:13 PDT 2014


On Fri, May 2, 2014 at 6:59 AM, Tobias Güntner <fatbull at web.de> wrote:

> Am 29.04.2014 19:18, schrieb Matthew O'Connor:
>
>  I want to be able to load my pass from an external library & not have it
>> compiled into opt.
>>
>
> INITIALIZE_AG_PASS defines initialization functions, but it does not
> actually call them. Try this instead:
>
>
> static RegisterPass<EverythingMustAlias> X("must-aa", "Everything must
> alias", false, true);
> static RegisterAnalysisGroup<AliasAnalysis> Y(X);
>
> I suppose INITIALIZE_AG_PASS is only required if the pass is directly
> linked into LLVM so it won't be initialized too early (before the rest of
> LLVM has been initialized). This isn't an issue for plugins, so static
> initialization works just fine there. But that's just my guess. ;)
>

That did it. Thanks. :)

Regards,
> Tobias
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140502/7c0e365e/attachment.html>


More information about the llvm-dev mailing list