Question about default optimizations

Sebastian Huber sebastian.huber@embedded-brains.de
Mon Nov 23 13:08:00 GMT 2015


Hello,

I am pretty sure that a better method exists to figure out the 
optimizations enabled by -O.*, but you can use the -fverbose-asm option 
and inspect the output. Look for "options enabled", e.g.

         .file   "x.c"

  # rs6000/powerpc options: -msdata=data -G 8
         .machine ppc
  # GNU C11 (GCC) version 6.0.0 20151102 (experimental) [master revision 
678bd42:02cf2eb:2980dcfbdeb643a1cfcf57020186a35bb8740820] 
(powerpc-rtems4.12)
  #      compiled by GNU C version 4.8.1 20130909 [gcc-4_8-branch 
revision 202388], GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0
  # GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
  # options passed:  -Dmpc750 x.c -O2 -fverbose-asm
  # options enabled:  -faggressive-loop-optimizations -falign-functions
  # -falign-jumps -falign-labels -falign-loops -fauto-inc-dec
  # -fbranch-count-reg -fcaller-saves -fchkp-check-incomplete-type
  # -fchkp-check-read -fchkp-check-write -fchkp-instrument-calls
  # -fchkp-narrow-bounds -fchkp-optimize -fchkp-store-bounds
  # -fchkp-use-static-bounds -fchkp-use-static-const-bounds
[...]

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the Gcc-help mailing list