[llvm-dev] Integrating llvm pass with pass manager
David Chisnall via llvm-dev
llvm-dev at lists.llvm.org
Mon Jan 15 05:21:41 PST 2018
On 14 Jan 2018, at 00:14, sangeeta chowdhary <sangitachowdhary at gmail.com> wrote:
> I have taken SimplePass and added in Transform directory, “libLLVMSimplePass.a” is built but I can not see this pass in opt —help. I don’t even see the name of pass while registering it in the example.
The SimplePass example is intended to be built out of tree, so I’ve no idea what happens if you try building it in tree. I wouldn’t expect to see it in the opt --help output, because it doesn’t define its own command-line options, it just adds itself to the default optimiser pipeline (at the end, and even if you’re running at -O0). You can see that it works by building it with its own CMake build system and then passing -Xclang -load -Xclang ./SimplePass.so to your clang command line.
More information about the llvm-dev