[CSC 435] Optimization Flags

Andrew J. Pounds pounds_aj at mercer.edu
Wed Jan 31 11:53:26 EST 2018


So I wrote a little perl program last night to run through and test ALL
of the optimization options for the gcc 6.4.0 compiler suite.  In the
following output the first line is the result (dimension, time, and the
two values that we check for consistency) using optimization flag -O0. 
Then I list the option I turned on in the makefile, and the results from
running the code with that optimization option only.  Some things help a
little, some things do not.  At least this way you can see what options
might help you.  I did not try combinations of options.

I ran these on a "quiet" machine so there was little competition for
processor time with others.  There are only a few options that, by
themselves, help.  You may want to look for combinations of options to
get better speedup.


dock:/tmp/pounds/condusty % ./testoptions.pl | tee dump | pace
rm: cannot remove `*.o': No such file or directory
make: *** [clean] Error 1
         100   61.750000000000000        386743.81287443032      
0.81989322403772058    
-fauto-inc-dec
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-fbranch-count-reg
         100   61.930000000000000        386743.81287443032      
0.81989322403772058    
-fcombine-stack-adjustments
         100   61.729999999999997        386743.81287443032      
0.81989322403772058    
-fcompare-elim
         100   61.840000000000003        386743.81287443032      
0.81989322403772058    
-fcprop-registers
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-fdce
         100   61.859999999999999        386743.81287443032      
0.81989322403772058    
-fdefer-pop
         f951: Warning: this target machine does not have delayed branches
100   61.82000f951: Warning: this target machine does not have delayed
branches
0000000000   cc1: warning: this target machine does not have delayed
branches
     386743.81287443032       0.81989322403772058    
-fdelayed-branch
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-fdse
         100   61.890000000000001        386743.81287443032      
0.81989322403772058    
-fforward-propagate
         100   61.899999999999999        386743.81287443032      
0.81989322403772058    
-fguess-branch-probability
         100   61.850000000000001        386743.81287443032      
0.81989322403772058    
-fif-conversion2
         100   61.840000000000003        386743.81287443032      
0.81989322403772058    
-fif-conversion
         100   61.920000000000002        386743.81287443032      
0.81989322403772058    
-finline-functions-called-once
         100   61.789999999999999        386743.81287443032      
0.81989322403772058    
-fipa-pure-const
         100   61.920000000000002        386743.81287443032      
0.81989322403772058    
-fipa-profile
         100   61.890000000000001        386743.81287443032      
0.81989322403772058    
-fipa-reference
         100   61.600000000000001        386743.81287443032      
0.81989322403772058    
-fmerge-constants
         100   61.770000000000003        386743.81287443032      
0.81989322403772058    
-fmove-loop-invariants
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-freorder-blocks
         100   61.899999999999999        386743.81287443032      
0.81989322403772058    
-fshrink-wrap
         100   61.579999999999998        386743.81287443032      
0.81989322403772058    
-fsplit-wide-types
         100   61.820000000000000        386743.81287443032      
0.81989322403772058    
-fssa-backprop
         100   62.020000000000003        386743.81287443032      
0.81989322403772058    
-fssa-phiopt
         100   61.899999999999999        386743.81287443032      
0.81989322403772058    
-ftree-bit-ccp
         100   61.880000000000003        386743.81287443032      
0.81989322403772058    
-ftree-ccp
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-ftree-ch
         100   61.820000000000000        386743.81287443032      
0.81989322403772058    
-ftree-coalesce-vars
         100   61.469999999999999        386743.81287443032      
0.81989322403772058    
-ftree-copy-prop
         100   61.740000000000002        386743.81287443032      
0.81989322403772058    
-ftree-dce
         100   61.880000000000003        386743.81287443032      
0.81989322403772058    
-ftree-dominator-opts
         100   61.850000000000001        386743.81287443032      
0.81989322403772058    
-ftree-dse
         100   61.890000000000001        386743.81287443032      
0.81989322403772058    
-ftree-forwprop
         100   61.759999999999998        386743.81287443032      
0.81989322403772058    
-ftree-fre
         100   61.930000000000000        386743.81287443032      
0.81989322403772058    
-ftree-phiprop
         100   61.820000000000000        386743.81287443032      
0.81989322403772058    
-ftree-sink
         100   61.899999999999999        386743.81287443032      
0.81989322403772058    
-ftree-slsr
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-ftree-sra
         100   61.770000000000003        386743.81287443032      
0.81989322403772058    
-ftree-pta
         100   61.890000000000001        386743.81287443032      
0.81989322403772058    
-ftree-ter
         100   62.880000000000003        386743.81287443032      
0.81989322403772058    
-funit-at-a-time
         100   61.840000000000003        386743.81287443032      
0.81989322403772058    
-fthread-jumps
         100   61.770000000000003        386743.81287443032      
0.81989322403772058    
-falign-functions 
         100   61.920000000000002        386743.81287443032      
0.81989322403772058    
-falign-jumps
         100   61.859999999999999        386743.81287443032      
0.81989322403772058    
-falign-loops 
         100   61.880000000000003        386743.81287443032      
0.81989322403772058    
-falign-labels
         100   61.850000000000001        386743.81287443032      
0.81989322403772058    
-fcaller-saves
         100   61.960000000000001        386743.81287443032      
0.81989322403772058    
-fcrossjumping
         100   61.829999999999998        386743.81287443032      
0.81989322403772058    
-fcse-follow-jumps 
         100   61.740000000000002        386743.81287443032      
0.81989322403772058    
-fcse-skip-blocks
         100   61.899999999999999        386743.81287443032      
0.81989322403772058    
-fdelete-null-pointer-checks
         100   62.140000000000001        386743.81287443032      
0.81989322403772058    
-fdevirtualize
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-fdevirtualize-speculatively
         100   61.710000000000001        386743.81287443032      
0.81989322403772058    
-fexpensive-optimizations
         100   61.469999999999999        386743.81287443032      
0.81989322403772058    
-fgcse
         100   61.759999999999998        386743.81287443032      
0.81989322403772058    
-fgcse-lm
         100   61.850000000000001        386743.81287443032      
0.81989322403772058    
-fhoist-adjacent-loads
         100   61.930000000000000        386743.81287443032      
0.81989322403772058    
-finline-small-functions
         100   61.770000000000003        386743.81287443032      
0.81989322403772058    
-findirect-inlining
         100   61.759999999999998        386743.81287443032      
0.81989322403772058    
-fipa-cp
         100   61.969999999999999        386743.81287443032      
0.81989322403772058    
-fipa-cp-alignment
         100   61.810000000000002        386743.81287443032      
0.81989322403772058    
-fipa-sra
         100   61.899999999999999        386743.81287443032      
0.81989322403772058    
-fipa-icf
         100   61.920000000000002        386743.81287443032      
0.81989322403772058    
-fisolate-erroneous-paths-dereference
         100   61.840000000000003        386743.81287443032      
0.81989322403772058    
-flra-remat
         100   61.780000000000001        386743.81287443032      
0.81989322403772058    
-foptimize-sibling-calls
         100   61.880000000000003        386743.81287443032      
0.81989322403772058    
-foptimize-strlen
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-fpartial-inlining
         100   61.590000000000003        386743.81287443032      
0.81989322403772058    
-fpeephole2
         100   61.759999999999998        386743.81287443032      
0.81989322403772058    
-freorder-blocks-algorithm=stc
         100   61.950000000000003        386743.81287443032      
0.81989322403772058    
-freorder-blocks-and-partition
         100   61.799999999999997        386743.81287443032      
0.81989322403772058    
-freorder-functions
         100   61.890000000000001        386743.81287443032      
0.81989322403772058    
-frerun-cse-after-loop
         100   61.950000000000003        386743.81287443032      
0.81989322403772058    
-fsched-interblock 
         100   61.770000000000003        386743.81287443032      
0.81989322403772058    
-fsched-spec
         100   61.899999999999999        386743.81287443032      
0.81989322403772058    
-fschedule-insns 
         100   61.829999999999998        386743.81287443032      
0.81989322403772058    
-fschedule-insns2
         100   61.909999999999997        386743.81287443032      
0.81989322403772058    
-fstrict-aliasing
         100   61.850000000000001        386743.81287443032      
0.81989322403772058    
-fstrict-overflow
         100   61.850000000000001        386743.81287443032      
0.81989322403772058    
-ftree-builtin-call-dce
         100   61.810000000000002        386743.81287443032      
0.81989322403772058    
-ftree-switch-conversion
         100   61.770000000000003        386743.81287443032      
0.81989322403772058    
-ftree-tail-merge
         100   61.750000000000000        386743.81287443032      
0.81989322403772058    
-ftree-pre
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-ftree-vrp
         100   61.820000000000000        386743.81287443032      
0.81989322403772058    
-fipa-ra
         100   61.930000000000000        386743.81287443032      
0.81989322403772058    
-finline-functions
         100   61.920000000000002        386743.81287443032      
0.81989322403772058    
-funswitch-loops
         100   61.789999999999999        386743.81287443032      
0.81989322403772058    
-fpredictive-commoning
         100   61.909999999999997        386743.81287443032      
0.81989322403772058    
-fgcse-after-reload
         100   61.850000000000001        386743.81287443032      
0.81989322403772058    
-ftree-loop-vectorize
         100   61.859999999999999        386743.81287443032      
0.81989322403772058    
-ftree-loop-distribute-patterns
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-fsplit-paths
         100   61.750000000000000        386743.81287443032      
0.81989322403772058    
-ftree-slp-vectorize
         100   61.869999999999997        386743.81287443032      
0.81989322403772058    
-fvect-cost-model
         100   61.780000000000001        386743.81287443032      
0.81989322403772058    
-ftree-partial-pre
         100   61.789999999999999        386743.81287443032      
0.81989322403772058    
-fipa-cp-clone
         100   61.920000000000002        386743.81287443032      
0.81989322403772058    
dock:/tmp/pounds/condusty %

-- 
Andrew J. Pounds, Ph.D.  (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University,  Macon, GA 31207   (478) 301-5627
http://faculty.mercer.edu/pounds_aj

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc435/attachments/20180131/aea4cb2f/attachment-0001.html>


More information about the csc435 mailing list