Hi Devang, GlobalModRefPass is also a ModulePass and it uses CallGraph Analysis. So, I think it should not necessary to extend CallGraphSCCPass to use CallGraph information. Module Pass shoule be sufficient... --Kapil On 10/8/08, Devang Patel <dpatel at apple.com> wrote:> Hi Kapil, > > On Oct 8, 2008, at 10:19 AM, kapil anand wrote: > >> Hi all, >> >> I need a new kind of analysis on LLVM Module, so I made a new pass >> to do this. This new pass extends the ModulePass class and follows >> the conventions used in GlobalModRefPass, which is also a Module >> Pass.I need the CallGraph analysis for this pass, hence I have added >> (addRequired(CallGraph)) in getAnalysisUsage function of this new >> pass. > > A module pass may not required CallGraph. Probably, you want to make > your pass a CallGraphSCCPass, e.g. Inliner. > >> I also added it to CallGraph Analysis group through >> "RegisterAnalysisGroup" >> >> This new pass is not part of any LLVM library and is not present in >> LLVM source tree . Rather it is part of my own project tree. I >> included required header files and specified the required library in >> the linker. It compiles and links fine but when I reach at >> getAnalysis function to get CallGraph analysis, it gives me >> following runtime error >> >> Assertion "resover && pass has not been inserted into a Pass >> Manager Object" failed. >> >> What other steps do I need to follow to get rid of this error. >> >> Thanks >> >> --Kapil >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > - > Devang > > > >
On Oct 8, 2008, at 10:59 AM, kapil anand wrote:> Hi Devang, > > GlobalModRefPass is also a ModulePass and it uses CallGraph Analysis. > So, I think it should not necessary to extend CallGraphSCCPass to use > CallGraph information. Module Pass shoule be sufficient...ok, but you're Registering your pass in CallGraph Analysis group. What if you remove "RegisterAnalysisGroup" ? Is there a need ? - Devang> > > > --Kapil > > On 10/8/08, Devang Patel <dpatel at apple.com> wrote: >> Hi Kapil, >> >> On Oct 8, 2008, at 10:19 AM, kapil anand wrote: >> >>> Hi all, >>> >>> I need a new kind of analysis on LLVM Module, so I made a new pass >>> to do this. This new pass extends the ModulePass class and follows >>> the conventions used in GlobalModRefPass, which is also a Module >>> Pass.I need the CallGraph analysis for this pass, hence I have added >>> (addRequired(CallGraph)) in getAnalysisUsage function of this new >>> pass. >> >> A module pass may not required CallGraph. Probably, you want to make >> your pass a CallGraphSCCPass, e.g. Inliner. >> >>> I also added it to CallGraph Analysis group through >>> "RegisterAnalysisGroup" >>> >>> This new pass is not part of any LLVM library and is not present in >>> LLVM source tree . Rather it is part of my own project tree. I >>> included required header files and specified the required library in >>> the linker. It compiles and links fine but when I reach at >>> getAnalysis function to get CallGraph analysis, it gives me >>> following runtime error >>> >>> Assertion "resover && pass has not been inserted into a Pass >>> Manager Object" failed. >>> >>> What other steps do I need to follow to get rid of this error. >>> >>> Thanks >>> >>> --Kapil >>> >>> >>> _______________________________________________ >>> LLVM Developers mailing list >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> - >> Devang >> >> >> >> > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev- Devang
HI Devang, Initially I had not added this pass to the group and I got this error regarding PassManager. I added the pass to group just to check whether that removes the error or not... I have removed it again. Is there any other registration required to configure pass manager for the pass? --Kapil On Wed, Oct 8, 2008 at 2:37 PM, Devang Patel <dpatel at apple.com> wrote:> > On Oct 8, 2008, at 10:59 AM, kapil anand wrote: > > > Hi Devang, > > > > GlobalModRefPass is also a ModulePass and it uses CallGraph Analysis. > > So, I think it should not necessary to extend CallGraphSCCPass to use > > CallGraph information. Module Pass shoule be sufficient... > > ok, but you're Registering your pass in CallGraph Analysis group. > What if you remove "RegisterAnalysisGroup" ? Is there a need ? > - > Devang > > > > > > > > --Kapil > > > > On 10/8/08, Devang Patel <dpatel at apple.com> wrote: > >> Hi Kapil, > >> > >> On Oct 8, 2008, at 10:19 AM, kapil anand wrote: > >> > >>> Hi all, > >>> > >>> I need a new kind of analysis on LLVM Module, so I made a new pass > >>> to do this. This new pass extends the ModulePass class and follows > >>> the conventions used in GlobalModRefPass, which is also a Module > >>> Pass.I need the CallGraph analysis for this pass, hence I have added > >>> (addRequired(CallGraph)) in getAnalysisUsage function of this new > >>> pass. > >> > >> A module pass may not required CallGraph. Probably, you want to make > >> your pass a CallGraphSCCPass, e.g. Inliner. > >> > >>> I also added it to CallGraph Analysis group through > >>> "RegisterAnalysisGroup" > >>> > >>> This new pass is not part of any LLVM library and is not present in > >>> LLVM source tree . Rather it is part of my own project tree. I > >>> included required header files and specified the required library in > >>> the linker. It compiles and links fine but when I reach at > >>> getAnalysis function to get CallGraph analysis, it gives me > >>> following runtime error > >>> > >>> Assertion "resover && pass has not been inserted into a Pass > >>> Manager Object" failed. > >>> > >>> What other steps do I need to follow to get rid of this error. > >>> > >>> Thanks > >>> > >>> --Kapil > >>> > >>> > >>> _______________________________________________ > >>> LLVM Developers mailing list > >>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > >>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >> > >> - > >> Devang > >> > >> > >> > >> > > _______________________________________________ > > LLVM Developers mailing list > > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > - > Devang > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20081008/4a4d03b2/attachment.html>