[llvm-dev] Integrating llvm pass with pass manager

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Sat Jan 13 04:35:28 PST 2018


On 13 Jan 2018, at 03:45, Craig Topper via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> I’m not sure what the correct way to do this is. I think your plugin needs to do something to tell clang/llvm when to run the pass. I’ll try to look later when I’m back at a computer.

You need to use RegisterStandardPasses to add it to the default pipeline automatically.  You can find an example here:

https://github.com/CompilerTeaching/SimplePass/blob/ba5248a9ea0bd9e1fab3b1f8a5c85d6e0db57acd/SimplePass.cc#L116

David



More information about the llvm-dev mailing list