title: Trying to understand gcc option -fomit-frame-pointer
body: <p>I asked Google to give me the meaning of the <code>gcc</code> option <code>-fomit-frame-pointer</code>, which redirects me to the below statement.</p>
  <blockquote>
  <p><strong>-fomit-frame-pointer</strong></p>
  <p>Don't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions. It also makes debugging impossible on some machines.</p>
  </blockquote>
  <p>As per my knowledge of each function, an activation record will be created in the stack of the process memory to keep all local variables and some more information. I hope this frame pointer means the address of the activation record of a function.</p>
  <p>In this case, what are the type of functions, for which it doesn't need to keep the frame pointer in a register? If I get this information, I will try to design the new function based on that (if possible) because if the frame pointer is not kept in registers, some instructions will be omitted in binary. This will really improve the performance noticeably in an application where there are many functions.</p>