Re: Question about instrumenting gimple

2020-09-16 Thread Erick Ochoa
Thanks Richard, for sake of completeness (and anyone in the future looks for a simple hello world example), here's what my code roughly looks like: push_cfun(f); // f is the function who calls malloc static void call_hello_world(gimple* g) { gimple_stmt_iterator gsi = gsi_start(g); const

Re: Question about instrumenting gimple

2020-09-16 Thread Richard Biener via Gcc
On Tue, Sep 15, 2020 at 5:14 PM Erick Ochoa wrote: > > Hi, > > I am trying to instrument gimple so that "hello world" is printed after > each call to malloc. I've tried instrumenting using the following code > > static void > // G points to the gcall which corresponds to malloc > call_hello_world(

Question about instrumenting gimple

2020-09-15 Thread Erick Ochoa
Hi, I am trying to instrument gimple so that "hello world" is printed after each call to malloc. I've tried instrumenting using the following code static void // G points to the gcall which corresponds to malloc call_hello_world(gimple* g) { gimple_stmt_iterator gsi = gsi_start(g); // cre