Wojciech Matyjewicz
2008-Jan-13 17:48 UTC
[LLVMdev] Pass manager question: module pass using function level analysis
Hi, I am going to write a module pass (say, P) that uses function level analysis (say, A). Suppose, I analyze two different functions during the P pass: bool P::runOnModule(Module &M) { ... A &X = getAnalysis<A>(F1); ... A &Y = getAnalysis<A>(F2); ... } Will X and Y reference the same object here? It's not a problem for me, as I don't need results of analysis of both functions at the same time. However, I wonder, if I should explicitly call releaseMemory() method after the first analysis. Thanks in advance for the answer. -Wojtek
Devang Patel
2008-Jan-14 18:20 UTC
[LLVMdev] Pass manager question: module pass using function level analysis
Hi, On Jan 13, 2008, at 9:48 AM, Wojciech Matyjewicz wrote:> Hi, > > I am going to write a module pass (say, P) that uses function level > analysis (say, A). Suppose, I analyze two different functions during > the > P pass: > > bool P::runOnModule(Module &M) { > ... > A &X = getAnalysis<A>(F1); > ... > A &Y = getAnalysis<A>(F2); > ... > } > > Will X and Y reference the same object here?No.> It's not a problem for me, > as I don't need results of analysis of both functions at the same > time. > However, I wonder, if I should explicitly call releaseMemory() method > after the first analysis.Yes, that's a good idea.> > > Thanks in advance for the answer. > -Wojtek > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev- Devang