[llvm-dev] About LLVM Pass dependency

Hongbin Zheng via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 3 09:13:31 PDT 2017


Hi Mahesh,

Did you override getAnalysisUsage and require D1, D2 and D3?


void YourPass::getAnalysisUsage(AnalysisUsage &AU) const {
  AU.addRequired<D1>();
  AU.addRequired<D2>();
  AU.addRequired<D3>();
}

On Tue, Oct 3, 2017 at 2:00 AM, Mahesh Attarde via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hello
>   I am working on pass which has dependency on multiple passes.  Say
> D1,D2,D3
> I used
> INITIALIZE_PASS_BEGIN
> INITIALIZE_PASS_DEPENDENCY(D1)
> INITIALIZE_PASS_DEPENDENCY(D2)
> INITIALIZE_PASS_DEPENDENCY(D3)
> INITIALIZE_PASS_END.
>
> While running it through opt tool it, I had to specify this D1,D2,D3 pass
> names
> to get this pass executed before my pass.
> Is there way, to let llvm pass manager to know  execute all dependencies
> without
> having to specify explicitly.?
>
> I suspect i am doing something wrong in my code, May be.
>
> Thanks
> Mahesh
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171003/3d4aec7e/attachment.html>


More information about the llvm-dev mailing list