Qiuping Yi via llvm-dev
2018-Apr-12 04:39 UTC
[llvm-dev] Error: Verify if there is a pass dependency cycle
Hi everyone, I write a new FunctionPass which wants to use pass PostDominatorTree, so I implement the next function: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<PostDominatorTree>(); AU.setPreservesAll(); } Then I get PDT through the next statement: PostDominatorTree *PDT = &getAnalysis<PostDominatorTree>(); My code can be successfully compiled. However, I encounter the next error when I ran the code: *Pass 'Unnamed pass: implement Pass::getPassName()' is not initialized.* *Verify if there is a pass dependency cycle.* *Required Passes:* I used llvm-3.4. Any comments are welcome. Thanks! Best regards, Qiuping Yi Institute Of Software Chinese Academy of Sciences -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180411/75d31e77/attachment.html>
Alexandre Isoard via llvm-dev
2018-Apr-14 05:57 UTC
[llvm-dev] Error: Verify if there is a pass dependency cycle
Hi, You need to initialize your pass with: INITIALIZE_PASS_BEGIN(YourPass, "your-pass", "Your Pass", /*cfgonly=*/false, /*analysis=*/false) INITIALIZE_PASS_DEPENDENCY(PostDominatorTreeWrapperPass) INITIALIZE_PASS_END(YourPass, "your-pass", "Your Pass", /*cfgonly=*/false, /*analysis=*/false) So as to both register your pass, and have PostDominatorTreeWrapperPass (which is the Analysis pass in charge of creating the PostDominatorTree) initialized before your pass. It also give a pretty name to YourPass: "Your Pass" And add an option to opt to run it: "-your-pass" On Wed, Apr 11, 2018 at 9:39 PM, Qiuping Yi via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi everyone, > > I write a new FunctionPass which wants to use pass PostDominatorTree, so I > implement the next function: > > void getAnalysisUsage(AnalysisUsage &AU) const { > AU.addRequired<PostDominatorTree>(); > AU.setPreservesAll(); > } > > Then I get PDT through the next statement: > > PostDominatorTree *PDT = &getAnalysis<PostDominatorTree>(); > > My code can be successfully compiled. However, I encounter the next error > when I ran the code: > > *Pass 'Unnamed pass: implement Pass::getPassName()' is not initialized.* > *Verify if there is a pass dependency cycle.* > *Required Passes:* > > I used llvm-3.4. Any comments are welcome. Thanks! > > > Best regards, > > Qiuping Yi > Institute Of Software > Chinese Academy of Sciences > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-- *Alexandre Isoard* -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180413/08c98088/attachment.html>
Qiuping Yi via llvm-dev
2018-Apr-14 14:48 UTC
[llvm-dev] Error: Verify if there is a pass dependency cycle
Yes, I forgot to initialize my pass. Thank you very much. Best regards, Qiuping Yi Institute Of Software Chinese Academy of Sciences On Sat, Apr 14, 2018 at 12:57 AM, Alexandre Isoard < alexandre.isoard at gmail.com> wrote:> Hi, > > You need to initialize your pass with: > > INITIALIZE_PASS_BEGIN(YourPass, "your-pass", "Your Pass", > /*cfgonly=*/false, /*analysis=*/false) > INITIALIZE_PASS_DEPENDENCY(PostDominatorTreeWrapperPass) > INITIALIZE_PASS_END(YourPass, "your-pass", "Your Pass", /*cfgonly=*/false, > /*analysis=*/false) > > So as to both register your pass, and have PostDominatorTreeWrapperPass > (which is the Analysis pass in charge of creating the PostDominatorTree) > initialized before your pass. > > It also give a pretty name to YourPass: "Your Pass" > And add an option to opt to run it: "-your-pass" > > > On Wed, Apr 11, 2018 at 9:39 PM, Qiuping Yi via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi everyone, >> >> I write a new FunctionPass which wants to use pass PostDominatorTree, so >> I >> implement the next function: >> >> void getAnalysisUsage(AnalysisUsage &AU) const { >> AU.addRequired<PostDominatorTree>(); >> AU.setPreservesAll(); >> } >> >> Then I get PDT through the next statement: >> >> PostDominatorTree *PDT = &getAnalysis<PostDominatorTree>(); >> >> My code can be successfully compiled. However, I encounter the next error >> when I ran the code: >> >> *Pass 'Unnamed pass: implement Pass::getPassName()' is not initialized.* >> *Verify if there is a pass dependency cycle.* >> *Required Passes:* >> >> I used llvm-3.4. Any comments are welcome. Thanks! >> >> >> Best regards, >> >> Qiuping Yi >> Institute Of Software >> Chinese Academy of Sciences >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> > > > -- > *Alexandre Isoard* >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180414/1f89b1ac/attachment.html>
Apparently Analagous Threads
- Error: Verify if there is a pass dependency cycle
- Let CallGraphSCCPass Use Function-Level Analysis
- Let CallGraphSCCPass Use Function-Level Analysis
- On-the-fly passes
- Confusing ERROR with LoopAccessLegacyAnalysis: Pass 'Unnamed pass: implement Pass::getPassName()' is not initialized.