Insert call to malloc in gimple

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux