On Tue, 2024-11-12 at 16:54 -0500, Aravind Ceyardass via Gcc wrote: > Hello all, > > I have implemented a GCC plugin that instruments code to implement > reference counted memory management instead of manually adding calls > to inc()/dec() reference counts. It is a work in progress. Any > ideas/suggestions are welcome. > > Code is at https://github.com/acbits/reftrack-plugin > > Here is a sample. > > typedef struct S S; > S *p = ... , *q = ...; > p = q; > > is transformed into > > typedef struct S S; > S *p = ... , *q = ...; > S_addref(q); > S_removeref(p); > p = q;
Looks interesting; thanks for letting us know. I've gone ahead and added a link to your project to the table of known plugins on our wikik (https://gcc.gnu.org/wiki/plugins) Dave