<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug 2, 2009, at 8:13 PM, Zhongxing Xu wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Author: zhongxingxu<br>Date: Sun Aug  2 22:13:46 2009<br>New Revision: 77943<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=77943&view=rev">http://llvm.org/viewvc/llvm-project?rev=77943&view=rev</a><br>Log:<br>Create only one AnalysisManager for each translation unit. In HandleCode(),<br>reset the current analysis context of the AnalysisManager.<br></span></blockquote></div><br><div>Hi Zhongxing,</div><div><br></div><div>I was thinking about this, and is there a reason that AnalysisManager needs to know about the current analysis context?  To me the notion of a "current context" seems limited and unnecessary.  When we start analyzing a function or method, can we not simply create an AnalysisContext on-the-fly that references AnalysisManager?</div><div><br></div><div>Ideally, we want a nice separation between the management of analysis data and the driving of analysis logic.  This reduces complexity, potential bugs, and also enable us to make AnalysisManager reentrant.  For example, I see no reason why a single AnalysisManager couldn't be used to analyze multiple functions in parallel, especially if its main task is to manage data.</div><div><br></div><div>Ted</div></body></html>