[cfe-dev] [RFC] A dataflow analysis framework for Clang AST

Yitzhak Mandelbaum via cfe-dev cfe-dev at lists.llvm.org
Fri Nov 19 05:03:29 PST 2021


We've released our first two patches:

First technical patch: https://reviews.llvm.org/D114234
An introduction to the dataflow analysis framework:
https://reviews.llvm.org/D114231

On Mon, Nov 8, 2021 at 4:01 PM David Blaikie <dblaikie at gmail.com> wrote:

>
>
> On Mon, Nov 8, 2021 at 2:00 AM Dmitri Gribenko <gribozavr at gmail.com>
> wrote:
>
>> On Sun, Nov 7, 2021 at 5:02 PM David Blaikie <dblaikie at gmail.com> wrote:
>>
>>> I guess this would subsume the Clang consumption attributes:
>>> https://clang.llvm.org/docs/AttributeReference.html#consumed-annotation-checking
>>> - could these older attributes then be reimplemented in terms of this new
>>> infrastructure? (or broadened in other ways to better expose this
>>> functionality)
>>>
>>
>> Yes, it should be possible to reimplement
>> llvm-project/clang/lib/Analysis/Consumed.cpp in terms of the proposed
>> dataflow analysis framework.
>>
>
> Would it be reasonable to have that on your plan/timeline? Would be nice
> to avoid the consumed analysis languishing as a dead end if it could be
> migrated to the new stuff (& be a nice proof-of-concept/place to make this
> new functionality live in an existing feature perhaps relatively early on
> (not that I think the consumed warnings/analysis are widely used - though
> I'm not sure)))
>
>
>>
>> Dmitri
>>
>> --
>> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
>> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211119/5304a081/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4000 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20211119/5304a081/attachment.bin>


More information about the cfe-dev mailing list