The frame pointer is removed by the following options:
The frame pointer can be removed in most cases. However, in
some cases the compiler cannot remove it (this behavior is common
to all processors supported by gcc).
In the following example:
int get(int size)
bar (table, size);
the size of the array 'table' is not known at compile time but at run time.
The table is allocated on the stack. Since it is necessary to restore the
stack before the return, the frame pointer is kept and used for that.