GNU Optimizations important question

Silverio Diquigiovanni silverio.di at qem.it
Fri Sep 29 15:49:20 UTC 2000


Silverio Diquigiovanni wrote:
> 
> Hi to all,
> I need to know what optimization rules involve following options in the
> gnu gcc 2.95.2 for SuperHitachi SH1/SH2:
> 
>     -O
>     -O0
>     -O1
>     -O2
>     -O3
>     -O4
>     -O5
>     -O6
>     -O7
>     -O8
>     -O9

FYI I've found that :


GNU C version 2.95.2 19991024 (release) (sh-rtems)
compiled by GNU C version 2.95.2 19991024 (release).

without -O options:
  -fpeephole
  -ffunction-cse
  -fkeep-static-consts
  -freg-struct-return
  -fsjlj-exceptions
  -fcommon
  -fgnu-linker
  -fargument-alias
  -fident

-Os:
  -fdefer-pop
  -fcse-follow-jumps
  -fcse-skip-blocks
  -fexpensive-optimizations
  -fthread-jumps
  -fstrength-reduce
  -fpeephole
  -fforce-mem
  -ffunction-cse
  -finline
  -fkeep-static-consts
  -fcaller-saves
  -freg-struct-return
  -fdelayed-branch
  -fgcse
  -frerun-cse-after-loop
  -frerun-loop-opt
  -fschedule-insns2
  -fsjlj-exceptions
  -fcommon
  -fgnu-linker
  -fregmove
  -foptimize-register-move
  -fargument-alias
  -fident
  -mspace

-O0:
  -fpeephole
  -ffunction-cse
  -fkeep-static-consts
  -freg-struct-return
  -fsjlj-exceptions
  -fcommon
  -fgnu-linker
  -fargument-alias
  -fident

-O1:
  -fdefer-pop
  -fthread-jumps
  -fpeephole
  -ffunction-cse
  -finline
  -fkeep-static-consts
  -freg-struct-return
  -fdelayed-branch
  -fsjlj-exceptions
  -fcommon
  -fgnu-linker
  -fargument-alias
  -fident

-O2:
  -fdefer-pop
  -fcse-follow-jumps
  -fcse-skip-blocks
  -fexpensive-optimizations
  -fthread-jumps
  -fstrength-reduce
  -fpeephole
  -fforce-mem
  -ffunction-cse
  -finline
  -fkeep-static-consts
  -fcaller-saves
  -freg-struct-return
  -fdelayed-branch
  -fgcse
  -frerun-cse-after-loop
  -frerun-loop-opt
  -fschedule-insns2
  -fsjlj-exceptions
  -fcommon
  -fgnu-linker
  -fregmove
  -foptimize-register-move
  -fargument-alias
  -fident

-O3:
  -fdefer-pop
  -fcse-follow-jumps
  -fcse-skip-blocks
  -fexpensive-optimizations
  -fthread-jumps
  -fstrength-reduce
  -fpeephole
  -fforce-mem
  -ffunction-cse
  -finline-functions
  -finline
  -fkeep-static-consts
  -fcaller-saves
  -freg-struct-return
  -fdelayed-branch
  -fgcse
  -frerun-cse-after-loop
  -frerun-loop-opt
  -fschedule-insns2
  -fsjlj-exceptions
  -fcommon
  -fgnu-linker
  -fregmove
  -foptimize-register-move
  -fargument-alias
  -fident

-O4:
  -fdefer-pop
  -fcse-follow-jumps
  -fcse-skip-blocks
  -fexpensive-optimizations
  -fthread-jumps
  -fstrength-reduce
  -fpeephole
  -fforce-mem
  -ffunction-cse
  -finline-functions
  -finline
  -fkeep-static-consts
  -fcaller-saves
  -freg-struct-return
  -fdelayed-branch
  -fgcse
  -frerun-cse-after-loop
  -frerun-loop-opt
  -fschedule-insns2
  -fsjlj-exceptions
  -fcommon
  -fgnu-linker
  -fregmove
  -foptimize-register-move
  -fargument-alias
  -fident



More information about the users mailing list