Insert call to malloc in gimple
Cristina Georgiana Opriceana
cristina.opriceana@gmail.com
Sun Jan 17 20:14:00 GMT 2016
Hello,
I am trying to recognize array declarations, get their size and
replace them with dynamic allocation, through malloc and free calls in
gimple.
So far I've managed to find arrays with something like:
if (TREE_CODE(var) == VAR_DECL &&
TREE_CODE(var_type) == ARRAY_TYPE ) { ... }
But how can I get the size of the array?
Also, supposing that malloc is called at least once, how can I
construct a new gimple call statement that refers to malloc?
Any ideas or examples would help me a lot, as I couldn't find too many.
Thanks,
Cristina
More information about the Gcc-help
mailing list