Skip to content

Instantly share code, notes, and snippets.

@hrj
Created November 24, 2015 03:52
Show Gist options
  • Save hrj/cd62bd1a766f6a50cd7e to your computer and use it in GitHub Desktop.
Save hrj/cd62bd1a766f6a50cd7e to your computer and use it in GitHub Desktop.
gcc optimisations that remain disabled in -O3

list

-fbranch-probabilities
-fbranch-target-load-optimize
-fbranch-target-load-optimize2
-fbtr-bb-exclusive
-fconserve-stack
-fcx-fortran-rules
-fcx-limited-range
-fdata-sections
-fdelayed-branch
-fexceptions
-ffinite-math-only
-ffloat-store
-fgcse-las
-fgcse-sm
-fgraphite-identity
-fipa-pta
-floop-block
-floop-interchange
-floop-nest-optimize
-floop-parallelize-all
-floop-strip-mine
-fmerge-all-constants
-fmodulo-sched
-fnon-call-exceptions
-fnothrow-opt
-fomit-frame-pointer
-fopt-info
-fpack-struct
-fpeel-loops
-freg-struct-return
-freorder-blocks-and-partition
-freschedule-modulo-scheduled-loops
-frounding-math
-fsched-pressure
-fsched-spec-load
-fsched-spec-load-dangerous
-fsched-stalled-insns
-fsched2-use-superblocks
-fschedule-insns
-fsection-anchors
-fsel-sched-pipelining
-fsel-sched-pipelining-outer-loops
-fsel-sched-reschedule-pipelined
-fselective-scheduling
-fselective-scheduling2
-fshort-double
-fshort-wchar
-fsignaling-nans
-fsingle-precision-constant
-fstrict-enums
-ftrapv
-ftree-coalesce-inlined-vars
-ftree-loop-distribution
-ftree-loop-if-convert-stores
-ftree-lrs
-funroll-all-loops
-funroll-loops
-funsafe-loop-optimizations
-funsafe-math-optimizations
-funwind-tables
-fvar-tracking-assignments-toggle
-fvar-tracking-uninit
-fvariable-expansion-in-unroller
-fvpt
-fwhole-program
-fwrapv

Command to get the above list

gcc -c -Q -O3 --help=optimizers | grep disabled | cut -f3 -d' '

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment