[cfe-commits] r77943 - in /cfe/trunk: include/clang/Analysis/PathSensitive/AnalysisManager.h lib/Frontend/AnalysisConsumer.cpp

Ted Kremenek kremenek at apple.com
Mon Aug 3 11:08:02 PDT 2009


On Aug 2, 2009, at 8:13 PM, Zhongxing Xu wrote:

> Author: zhongxingxu
> Date: Sun Aug  2 22:13:46 2009
> New Revision: 77943
>
> URL: http://llvm.org/viewvc/llvm-project?rev=77943&view=rev
> Log:
> Create only one AnalysisManager for each translation unit. In  
> HandleCode(),
> reset the current analysis context of the AnalysisManager.

Hi Zhongxing,

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?

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.

Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20090803/cdca9c96/attachment.html>


More information about the cfe-commits mailing list