[llvm-dev] Confused by how to register a pass with opt
Jon Chesterfield via llvm-dev
llvm-dev at lists.llvm.org
Mon Nov 5 14:51:44 PST 2018
>
> You need to call "initializeMyExamplePass" ahead of time. Look at
> include/llvm/InitializePasses.h, and for the actual calls that
> initialize individual passes, at lib/Analysis/Analysis.cpp,
> lib/Transforms/Scalar/Scalar.cpp, etc.
>
> These are all called from "main" in opt.cpp.
>
> -Krzysztof
>
Ah, right. Given the hint that I actually do need to arrange to call
initialize myself, I've put the call to initializeMyExamplePass in
LLVMInitializeMyTarget. That works fine and, now that I've looked more
carefully, seems to be how other targets have done it.
Thanks!
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181105/08c1c93e/attachment.html>
More information about the llvm-dev
mailing list