[cfe-dev] CFG initializers and destructors patch

Zhongxing Xu xuzhongxing at gmail.com
Sun Sep 5 22:34:29 PDT 2010


On Mon, Sep 6, 2010 at 12:57 PM, Ted Kremenek <kremenek at apple.com> wrote:

>
> On Sep 5, 2010, at 8:37 PM, Zhongxing Xu wrote:
>
> > About CFGElement, I think we an avoid using two pointers in it. Currently
> the second pointer data is used for 'the statement that triggers the dtor. I
> think we don't need a pointer for it. The position where the CFGElement
> resides is the place where it is triggered. It is not triggered by a
> statement.
>
> One thing to keep in mind is that we will want the ability to distinguish
> different CFGImplicitDtor's that represent the destruction of the same
> object (at different locations).  This will be need for creating
> ProgramPoints, both for the flow-sensitive and path-sensitive engines, that
> we can use as points to anchor dataflow facts at unique locations.  With
> Stmt's, for the most part a single Stmt* appears once in a CFG (thus
> creating unique ProgramPoints).  That isn't the case for destructors of the
> same object.  This means we will likely need a second field in CFGElement
> that has some data that uniquely distingues them.  If that is the call
> location, then that might be unique enough.
>

Makes sense.


>
> My guiding advice is that we shouldn't worry too much about optimizing away
> the second pointer until we know we have this working not only in the CFG,
> but also the dataflow engines.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100906/4ccfd70f/attachment.html>


More information about the cfe-dev mailing list