Re: Where to find global var declaration

2016-04-27 Thread Cristina Georgiana Opriceana
On Wed, Apr 27, 2016 at 4:54 PM, David Malcolm wrote: > On Wed, 2016-04-27 at 12:34 +0300, Cristina Georgiana Opriceana wrote: >> Hello, >> >> I tried to add a new global declaration of a pointer and I expected >> to >> see it in varpool nodes, but it does

Where to find global var declaration

2016-04-27 Thread Cristina Georgiana Opriceana
Hello, I tried to add a new global declaration of a pointer and I expected to see it in varpool nodes, but it does not appear there. ustackptr = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifier ("ustackptr"), build_pointer_type(void_

SafeStack proposal in GCC

2016-04-13 Thread Cristina Georgiana Opriceana
Hello, I bring to your attention SafeStack, part of a bigger research project - CPI/CPS [1], which offers complete protection against stack-based control flow hijacks. I am interested in developing SafeStack for GCC and I would like to ask for your feedback on this proposal. SafeStack is a secur

Re: Compute all gimple statements in which a var is used

2016-04-05 Thread Cristina Georgiana Opriceana
On Mon, Mar 28, 2016 at 10:55 PM, Richard Biener wrote: > On March 28, 2016 7:23:26 PM GMT+02:00, Cristina Georgiana Opriceana > wrote: >>Hello, >> >>In order to compute all the statements where a variable is used, is it >>enough to rely on the SSA analysis? I t

Compute all gimple statements in which a var is used

2016-03-28 Thread Cristina Georgiana Opriceana
Hello, In order to compute all the statements where a variable is used, is it enough to rely on the SSA analysis? I tried to do something like this: FOR_EACH_LOCAL_DECL (cfun, i, var) { for (unsigned int i = 0; i < num_ssa_names; i++) { if (ssa_name(i) && SSA_NAME_VAR (ssa_nam

Help with building MEM_REF node

2016-02-17 Thread Cristina Georgiana Opriceana
Hello, I inserted a new local var decl in gimple, a pointer which is malloc'ed and now I am trying to read/write in that memory. int *mumu; mumu = malloc ( 40 * sizeof (int)); mumu[1] = 10; The following statement: mumu[1] = 10; which should look like this MEM[(int *)mumu_10 + 4B] = 10; for me,

Helper for replaceAllUses in gcc gimple

2016-02-11 Thread Cristina Georgiana Opriceana
Hello, Is there any implementation for replacing all uses of a variable with another variable in gimple? If I want to replace the uses of a variable with another one, do I have to do this by hand, investigate the type of the instruction and perform a replacement where necessary or is there any so