Author Topic: Add "-fomit-frame-pointer" option for MINGW and GNUARM  (Read 18186 times)

Offline mmkider

  • Almost regular
  • **
  • Posts: 150
Add "-fomit-frame-pointer" option for MINGW and GNUARM
« on: March 31, 2009, 03:44:45 am »
It's category is  _("Optimization");

category = _("Optimization");
m_Options.AddOption(_("Don't remain frame pointer"), _T("-fomit-frame-pointer"), category);


Thank you.
« Last Edit: March 31, 2009, 06:01:13 am by mmkider »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5195
Re: Add "-fomit-frame-pointer" option for MINGW and GNUARM
« Reply #1 on: March 31, 2009, 09:19:28 am »
will do that :

for my own reference :
Quote
-fomit-frame-pointer
    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.

    On some machines, such as the VAX, this flag has no effect, because the standard calling sequence automatically handles the frame pointer and nothing is saved by pretending it doesn't exist. The machine-description macro FRAME_POINTER_REQUIRED controls whether a target machine supports this flag. See Register Usage.

    Enabled at levels -O, -O2, -O3, -Os.

Offline mmkider

  • Almost regular
  • **
  • Posts: 150
Re: Add "-fomit-frame-pointer" option for MINGW and GNUARM
« Reply #2 on: March 31, 2009, 09:27:48 am »
will do that :

for my own reference :
Quote
-fomit-frame-pointer
    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.

    On some machines, such as the VAX, this flag has no effect, because the standard calling sequence automatically handles the frame pointer and nothing is saved by pretending it doesn't exist. The machine-description macro FRAME_POINTER_REQUIRED controls whether a target machine supports this flag. See Register Usage.

    Enabled at levels -O, -O2, -O3, -Os.
Hi,
I reference Chape 5 of "Arm system Developer's Guide: Designing and Optimizing system software" book.
This book mention this option.
Then, I trace arm-elf-gcc between within -fomit-frame-pointer and without -fomit-frame-pointer.
Producing asm for arm within -fomit-frame-pointer option is more clear than without -fomit-frame-pointer option.

but I never check this option for MINGW  what has any effect.




« Last Edit: March 31, 2009, 09:33:21 am by mmkider »

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5195
Re: Add "-fomit-frame-pointer" option for MINGW and GNUARM
« Reply #3 on: March 31, 2009, 08:54:17 pm »
done : svn 5495