[RFC] new tools for pounding on GCC

Janis Johnson janis187@us.ibm.com
Sat Sep 22 00:41:00 GMT 2007


James Bach's ALLPAIRS comes up with a reasonably small set of pair-wise
combinations of values for different variables when it isn't possible to
test all combinations; see http://www.satisfice.com/tools.shtml.  I've
written an ALLPAIRS wrapper, GENOPTS, to generate combinations of GCC
command line options.  GENOPTS takes input that's easier for people in
Unix-like environments to create and writes a list of command lines.
This probably isn't ready for others to use, but it's in the form of a
patch for the contrib directory for people to try out.

I've got a setup that makes it easy for me to build and run (with short
test input) individual tests from SPEC CPU2000 with multiple sets of
options.  In the last few days I've run those tests using sets of
options generated by GENOPTS for -O2 or -Os and combinations of
optimizations that are eigher enabled or disabled by default for each
of those, plus debugging options and -fpic/-fPIC/-fpie.  So far I've
found option combinations that cause 7 wrong-code failures and 15
build failures, mostly ice-on-valid-code.  I'll send mail to the GCC
list asking which of those are worth minimizing and reporting.

Some of the options lists I generated were quite long (40 or more
options) so the script minopts takes a set of options for which a test
fails and finds the minimum set that still causes the failure.

If this sounds interesting, please play with this stuff and provide
feedback.

2007-09-21  Janis Johnson  <janis187@us.ibm.com>
	
	* genops: New directory.
	* genopts/README: New file.
	* genopts/genopts.pl: New file.
	* genopts/example.in: New file.
	* genopts/minopts: New file.
	* genopts/input: New directory.
	* genopts/input/O2.in
	* genopts/input/O2-enabled.in
	* genopts/input/O2-disabled.in
	* genopts/input/Os.in
	* genopts/input/Os-enabled.in
	* genopts/input/Os-disabled.in
	* genopts/input/pic.in
	* genopts/input/dbg.in
	* genopts/input/vect.in
	* genopts/input/lev.in

Index: contrib/genopts/README
===================================================================
--- contrib/genopts/README	(revision 0)
+++ contrib/genopts/README	(revision 0)
@@ -0,0 +1,33 @@
+James Bach's ALLPAIRS takes several sets of values and comes up with
+a small list of combinations that combines each value from each set
+with each value from each other set.  Get ALLPAIRS from
+http://www.satisfice.com/tools.shtml.
+
+Genopts uses ALLPAIRS to generate sets of GCC options using several
+sets of values.  For example, for -m64; plus one of -O0, -O1, -O2, -O3,
+or -Os; zero or one of -g or -g3; and -ffast-math or not; it might come
+up with the following option lists:
+
+    -m64 -O1 -ffast-math -g3 
+    -m64 -O2 -ffast-math 
+    -m64 -O3 -ffast-math -g 
+    -m64 -Os -ffast-math -g3 
+    -m64 -O0 
+    -m64 -O1 -g 
+    -m64 -O2 -g3 
+    -m64 -O3 
+    -m64 -Os -g 
+    -m64 -O0 -g3 
+    -m64 -O1 
+    -m64 -O2 -g 
+    -m64 -O3 -g3 
+    -m64 -Os 
+
+giving 14 lists, rather than 30 (5*3*2) from all combinations of the
+sets of options.  Combining 45 options that are normally disabled
+with -O2 with 80 options that are normally enabled with -O2 gives only
+20 option lists.
+
+Create the example list above with
+
+  genopts.pl example.in > example.out
Index: contrib/genopts/genopts.pl
===================================================================
--- contrib/genopts/genopts.pl	(revision 0)
+++ contrib/genopts/genopts.pl	(revision 0)
@@ -0,0 +1,219 @@
+#! /usr/bin/perl
+
+# Wrapper to James Bach's ALLPAIRS to generate sets of command line
+# options; see http://www.satisfice.com/tools.shtml to get that tool.
+#
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Contributed by Janis Johnson <janis187@us.ibm.com>.
+
+# This file is part of GCC.
+
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+
+########################################################################
+#
+# Read input from all files named on the command line, or from STDIN.
+# Each line of input is a set of choices for command line options.  This
+# script formats the input and send it to ALLPAIRS.  It then formats the
+# ALLPAIRS output as lines of command line options.
+#
+# The colon-separated fields in each non-comment line of the input file:
+#   unique label
+#   1 to always use one of the options, 0 otherwise
+#   list of choices for this option set; use a space for a null choice
+
+$txtfile="genopts.txt";
+$tmpfile="genopts.tmp";
+
+%usetilde = ();
+%values = ();
+$maxlist = 0;
+$lineno = 0;
+
+# Die with an error message containing a line number from the input file.
+
+sub error
+{
+    $msg = shift;
+    die "$ARGV:$lineno: error: $msg\n";
+}
+
+# Check the input for various error conditions.
+
+sub validate_input
+{
+    $label = shift;
+    $flag = shift;
+    $optcnt = shift;
+
+    if ($label eq "") {
+	error("missing label");
+    }
+    if ($values{$label} != 0) {
+	error("label '$label' used more than once");
+    }
+    if ($flag ne "0" && $flag ne "1") {
+	error("invalid flag value '$flag', must be 0 or 1");
+    } 
+    if ($optcnt == 0) {
+	error("entry for '$label' needs at least one option");
+    }
+}
+
+# Read the input file into hashes of option lists and flags, using the
+# label from the beginning of each line as the key.  Keep an array of
+# labels so we can keep them in the input order.
+
+sub get_input
+{
+    while (chomp($line = <>)) {
+	$lineno++;
+
+	# Ignore comment lines.
+	next if $line =~ /^#/;
+	# Ignore lines that are only whitespace or empty.
+	next if $line =~ /^\s*$/;
+
+	# Get values from the current line into variables we can examine.
+	($label, $flag, @list) = split(":", $line);
+	$optcnt = $#list + 1;
+
+	# Check for errors.
+	validate_input($label,$flag,$optcnt);
+
+	# Add the new input to the hashes and label array.
+	$usetilde{$label} = $flag;
+	$optcounts{$label} = $optcnt;
+	$values{$label} = [ @list ];
+	push @labels, $label;
+
+	# Keep track of the largest list of options.
+	$maxlist = $optcnt if $optcnt > $maxlist;
+    }
+
+    # Fill out each list of values to the maximum length.
+    foreach $key (keys %values) {
+	for ($i = $optcounts{$key}; $i < $maxlist; $i++) {
+	    push @{ $values{$key} }, "";
+	}
+    }
+}
+
+sub value_is_empty
+{
+    $optindex = shift;
+    $keyindex = shift;
+
+    return (${ @values{$labels[$keyindex]} }[$optindex] eq "");
+}
+
+# Write the table that is the input to allpairs.pl.
+
+sub generate_txt
+{
+    # The first line is the labels.  Print the first key.
+    print(TXTFILE "$labels[0]");
+    # Print remaining keys, separated by tabs.
+    for ($i = 1; $i <= $#labels; $i++) {
+	print(TXTFILE "	$labels[$i]");
+    }
+    print(TXTFILE "\n");
+
+    # Following lines are value indices, with nulls to fill out the table.
+    for ($i = 0; $i < $maxlist; $i++) {
+	# Print the first key's index for this row.
+	print (TXTFILE "$i") unless (value_is_empty($i, 0));
+
+	# Print indices for values of remaining keys, separated by tabs.
+	for ($j = 1; $j <= $#labels; $j++) {
+	    print (TXTFILE "	");
+	    print(TXTFILE "$i") unless (value_is_empty($i, $j));
+	}
+	print(TXTFILE "\n");
+    }
+}
+
+# Process a field from ALLPAIRS output.
+
+sub process_field
+{
+    $optindex = shift;
+    $key = shift;
+
+    # Ignore if empty or whitespace.
+    return if $optindex =~ /^\s+$/;
+
+    # ALLPAIRS prepends a tilde for optional values, which are already
+    # represented in all pairs.  The usetilde flag says whether or not
+    # we want to use them for this set of options.
+    if ($optindex =~ /^~/) {
+	return if ($usetilde{$key} == 0);
+
+	# We want this option, so remove the tilde.
+	for ($optindex) {
+	    s/~//;
+	}
+    }
+    unless (${ @values{$key} }[$optindex] =~ /^\s+$/) {
+	print("${ @values{$key} }[$optindex] ");
+    }
+}
+
+# Write the ALLPAIRS output as usable lists of options.
+
+sub postprocess
+{
+    # The first three lines of ALLPAIRS output are a line of white space
+    # followed by "TEST CASES" followed by column headings: case number,
+    # each of our labels, and pairings.  We ignore those and proceess the
+    # following lines up to a line of whitespace.  In each of those lines
+    # we ignore the first and last fields, processing only the middles
+    # ones.
+
+    for ($i = 4; $i < $#pairsout; $i++) {
+	# Process lines until we reach an empty one.
+	$line = $pairsout[$i];
+	last if $line =~ /^\s+$/;
+
+	# Process fields of interest in the line.
+	@fields = split("	", $line);
+	for ($j = 0; $j <= $#labels; $j++) {
+	    process_field($fields[$j+1],$labels[$j]);
+	}
+	print("\n");
+    }
+}
+
+# Read the input file.
+
+get_input;
+
+# Write the file used by ALLPAIRS.
+
+open(TXTFILE, ">$txtfile") or die "error: Can't open $txtfile for writing\n";
+generate_txt;
+
+# Invoke ALLPAIRS to do the real work.
+
+@pairsout = `perl allpairs.pl $txtfile`;
+
+# Write the ALLPAIRS output to a file.
+
+open(TMPFILE, ">$tmpfile") or die "error: Can't open $tmpfile for writing\n";
+print (TMPFILE "@pairsout");
+
+# Turn the ALLPAIRS output into lists of options and write to stdout.
+
+postprocess;

Property changes on: contrib/genopts/genopts.pl
___________________________________________________________________
Name: svn:executable
   + *

Index: contrib/genopts/example.in
===================================================================
--- contrib/genopts/example.in	(revision 0)
+++ contrib/genopts/example.in	(revision 0)
@@ -0,0 +1,12 @@
+# This is always used.
+bits:1:-m64
+
+# One of these is always used.
+lev:1:-O0:-O1:-O2:-O3:-Os
+
+# The option is used when needed to make pairs but no more.  Without a
+# blank option it's possible that it will always be used.
+fm:0:-ffast-math
+
+# Debugging options; final one is blank, which is treated as a real option.
+dbg:0:-g:-g3: 
Index: contrib/genopts/minopts
===================================================================
--- contrib/genopts/minopts	(revision 0)
+++ contrib/genopts/minopts	(revision 0)
@@ -0,0 +1,57 @@
+#! /bin/bash
+
+# Given a list of command line options and, via an environment variable,
+# the name of a script that runs a test using one or more of those options,
+# find the minimum set of those options that cause the test to fail when
+# the full set causes the test to fail.
+
+#set -x
+
+OPTS="$1"
+
+# Script to run a test using a set of options.
+TRYOPTS=${TRYOPTS-tryopts}
+# File containing original set of options, one per line.
+echo $OPTS | sed 's/ /\
+/g' > opts.all
+
+NUM=0
+
+cp opts.all opts.tocheck
+rm -f opts.needed
+touch opts.needed
+
+# Verify that the test fails with the complete set of options.
+$TRYOPTS $NUM "`cat opts.tocheck`"
+if [ $? -eq 0 ]; then
+  echo "error: test does not fail with complete set of options"
+  exit 1
+fi
+
+while
+  test -s opts.tocheck
+do
+  # Remove a line from the list of options to check; save it.
+  read OPTLINE < opts.tocheck
+  sed 1d < opts.tocheck > opts.tocheck.tmp
+  mv opts.tocheck.tmp opts.tocheck
+
+  let NUM=NUM+1
+  $TRYOPTS $NUM "`cat opts.needed opts.tocheck`"
+  if [ $? -eq 0 ]; then
+    echo "$OPTLINE" >> opts.needed
+    echo "option $OPTLINE is needed"
+  else
+    echo "option $OPTLINE is not needed"
+  fi
+done
+
+# Verify that the test fails with the needed set of options.
+# This also ensures the final test fails so output is available.
+$TRYOPTS $NUM "`cat opts.needed`"
+if [ $? -eq 0 ]; then
+  echo "error: test does not fail with needed set of options"
+  exit 1
+fi
+
+exit 0

Property changes on: contrib/genopts/minopts
___________________________________________________________________
Name: svn:executable
   + *

Index: contrib/genopts/input/README
===================================================================
--- contrib/genopts/input/README	(revision 0)
+++ contrib/genopts/input/README	(revision 0)
@@ -0,0 +1,17 @@
+The input files in this directory are meant to be used as examples or
+starting points.
+
+Options listed O2-*.in and Os-*.in re those normally enabled or disabled
+with -O2 or -Os on powerpc64-linux.  The list for O2-disabled.in, for
+example, was obtained with the list was obtained with
+
+   gcc -Q -O2 --help=optimize | fgrep disabled
+
+and then massaged to combine related options not meant to be used at the
+same time.  Options known to cause problems in many tests have been
+temporarily commented out.  Options known to cause problems in
+combination with others have been grouped so they aren't used at the
+same time.
+
+Single options -O2 and -Os are in their own files that can be
+specified to GENOPTS at the same time as the enabled/disabled lists.
Index: contrib/genopts/input/O2.in
===================================================================
--- contrib/genopts/input/O2.in	(revision 0)
+++ contrib/genopts/input/O2.in	(revision 0)
@@ -0,0 +1 @@
+O2:1:-O2
Index: contrib/genopts/input/O2-enabled.in
===================================================================
--- contrib/genopts/input/O2-enabled.in	(revision 0)
+++ contrib/genopts/input/O2-enabled.in	(revision 0)
@@ -0,0 +1,84 @@
+# These options are enabled by default for -O2 on powerpc64-linux.
+#
+aj:0: :-fno-align-jumps
+alb:0: :-fno-align-labels
+aa:0: :-fno-argument-alias
+bcr:0: :-fno-branch-count-reg
+cs:0: :-fno-caller-saves
+#cm:0: :-fno-common
+cr:0: :-fno-cprop-registers
+cj:0: :-fno-crossjumping
+cfj:0: :-fno-cse-follow-jumps
+dce:0: :-fno-dce
+dp:0: :-fno-defer-pop
+dnp:0: :-fno-delete-null-pointer-checks
+dse:0: :-fno-dse
+ei:0: :-fno-early-inlining
+eo:0: :-fno-expensive-optimizations
+fp:0: :-fno-forward-propagate
+gs:0: :-fno-gcse
+gsl:0: :-fno-gcse-lm
+gb:0: :-fno-guess-branch-probability
+ic:0: :-fno-if-conversion
+ic2:0: :-fno-if-conversion2
+ifo:0: :-fno-inline-functions-called-once
+isf:0: :-fno-inline-small-functions
+ipc:0: :-fno-ipa-pure-const
+ir:0: :-fno-ipa-reference
+ite:0: :-fno-ipa-type-escape
+ivo:0: :-fno-ivopts
+jt:0: :-fno-jump-tables
+mc:0: :-fno-merge-constants
+mli:0: :-fno-move-loop-invariants
+ofp:0: :-fno-omit-frame-pointer
+orm:0: :-fno-optimize-register-move
+osc:0: :-fno-optimize-sibling-calls
+ph:0: :-fno-peephole
+ph2:0: :-fno-peephole2
+rsr:0: :-fno-reg-struct-return
+rgm:0: :-fno-regmove
+rr:0: :-fno-rename-registers
+rb:0: :-fno-reorder-blocks
+rf:0: :-fno-reorder-functions
+rcl:0: :-fno-rerun-cse-after-loop
+sib:0: :-fno-sched-interblock
+ss:0: :-fno-sched-spec
+sid:0: :-fno-sched-stalled-insns-dep
+sin:0: :-fno-schedule-insns
+se2:0: :-fno-schedule-insns2
+sa:0: :-fno-section-anchors
+sz:0: :-fno-signed-zeros
+siu:0: :-fno-split-ivs-in-unroller
+fwt:0: :-fno-split-wide-types
+sta:0: :-fno-strict-aliasing
+tj:0: :-fno-thread-jumps
+tr:0: :-fno-toplevel-reorder
+tm:0: :-fno-trapping-math
+ccp:0: :-fno-tree-ccp
+# these fail when used together, so avoid that; this is temporary
+#ch:0: :-fno-tree-ch
+#scp:0: :-fno-tree-scev-cprop
+ch:0: :-fno-tree-ch:-fno-tree-scev-cprop
+cp:0: :-fno-tree-copy-prop
+cpr:0: :-fno-tree-copyrename
+cse:0: :-fno-tree-cselim
+tdc:0: :-fno-tree-dce
+do:0: :-fno-tree-dominator-opts
+tds:0: :-fno-tree-dse
+fre:0: :-fno-tree-fre
+lim:0: :-fno-tree-loop-im
+liv:0: :-fno-tree-loop-ivcanon
+lpo:0: :-fno-tree-loop-optimize
+pre:0: :-fno-tree-pre
+rea:0: :-fno-tree-reassoc
+#sal:0: :-fno-tree-salias
+snk:0: :-fno-tree-sink
+sra:0: :-fno-tree-sra
+stp:0: :-fno-tree-store-ccp
+scy:0: :-fno-tree-store-copy-prop
+ter:0: :-fno-tree-ter
+vlv:0: :-fno-tree-vect-loop-version
+vrp:0: :-fno-tree-vrp
+uat:0: :-fno-unit-at-a-time
+vt:0: :-fno-var-tracking
+web:0: :-fno-web
Index: contrib/genopts/input/O2-disabled.in
===================================================================
--- contrib/genopts/input/O2-disabled.in	(revision 0)
+++ contrib/genopts/input/O2-disabled.in	(revision 0)
@@ -0,0 +1,46 @@
+# These options are disabled by default for -O2 on powerpc64-linux.
+#
+alp:0: :-falign-loops
+an:0: :-fargument-noalias:-fargument-noalias-anything:-fargument-noalias-global
+bbe:0: :-fbtr-bb-exclusive
+csb:0: :-fcse-skip-blocks
+clr:0: :-fcx-limited-range
+ds:0: :-fdata-sections
+#db:0: :-fdelayed-branch
+fmo:0: :-ffinite-math-only
+fs:0: :-ffloat-store
+fa:0: :-fforce-addr
+gar:0: :-fgcse-after-reload
+gla:0: :-fgcse-las
+gsm:0: :-fgcse-sm
+in:0: :-finline-functions
+icp:0: :-fipa-cp
+imr:0: :-fipa-matrix-reorg
+#ipt:0: :-fipa-pta
+mac:0: :-fmerge-all-constants
+nce:0: :-fnon-call-exceptions
+ps:0: :-fpack-struct
+pl:0: :-fpeel-loops
+pc:0: :-fpredictive-commoning
+pla:0: :-fprefetch-loop-arrays
+# these can't be used together
+# -fmodulo-sched breaks when used with -freorder-blocks-and-partition
+rbp:0: :-freorder-blocks-and-partition:-fexceptions:-funwind-tables:-fasynchronous-unwind-tables:-fmodulo-sched
+rms:0: :-freschedule-modulo-scheduled-loops
+rm:0: :-frounding-math
+#ras:0: :-frtl-abstract-sequences
+ssl:0: :-fsched-spec-load:-fsched-spec-load-dangerous
+ssi:0: :-fsched-stalled-insns
+#sus:0: :-fsched2-use-superblocks
+sn:0: :-fsignaling-nans
+# this causes crafty to fail
+tv:0: :-ftrapv
+ll:0: :-ftree-loop-linear
+lrs:0: :-ftree-lrs
+unr:0: :-funroll-all-loops:-funroll-loops
+ulo:0: :-funsafe-loop-optimizations
+umo:0: :-funsafe-math-optimizations
+ul:0: :-funswitch-loops
+vtu:0: :-fvar-tracking-uninit -g
+veu:0: :-fvariable-expansion-in-unroller
+wrv:0: :-fwrapv
Index: contrib/genopts/input/Os.in
===================================================================
--- contrib/genopts/input/Os.in	(revision 0)
+++ contrib/genopts/input/Os.in	(revision 0)
@@ -0,0 +1 @@
+Os:1:-Os
Index: contrib/genopts/input/Os-enabled.in
===================================================================
--- contrib/genopts/input/Os-enabled.in	(revision 0)
+++ contrib/genopts/input/Os-enabled.in	(revision 0)
@@ -0,0 +1,78 @@
+# These options are enabled by default for -Os on powerpc64-linux.
+#
+alp:0: :-fno-align-loops
+aa:0: :-fno-argument-alias
+bcr:0: :-fno-branch-count-reg
+cs:0: :-fno-caller-saves
+#cm:0: :-fno-common
+cr:0: :-fno-cprop-registers
+cj:0: :-fno-crossjumping
+cfj:0: :-fno-cse-follow-jumps
+dce:0: :-fno-dce
+dp:0: :-fno-defer-pop
+dnp:0: :-fno-delete-null-pointer-checks
+dse:0: :-fno-dse
+ei:0: :-fno-early-inlining
+eo:0: :-fno-expensive-optimizations
+fp:0: :-fno-forward-propagate
+gs:0: :-fno-gcse
+gsl:0: :-fno-gcse-lm
+gb:0: :-fno-guess-branch-probability
+ic:0: :-fno-if-conversion
+ic2:0: :-fno-if-conversion2
+in:0: :-fno-inline-functions
+if0:0: :-fno-inline-functions-called-once
+isf:0: :-fno-inline-small-functions
+ipc:0: :-fno-ipa-pure-const
+ir:0: :-fno-ipa-reference
+ite:0: :-fno-ipa-type-escape
+ivo:0: :-fno-ivopts
+jt:0: :-fno-jump-tables
+mc:0: :-fno-merge-constants
+mli:0: :-fno-move-loop-invariants
+ofp:0: :-fno-omit-frame-pointer
+orm:0: :-fno-optimize-register-move
+osc:0: :-fno-optimize-sibling-calls
+ph:0: :-fno-peephole
+ph2:0: :-fno-peephole2
+rsr:0: :-fno-reg-struct-return
+rgm:0: :-fno-regmove
+rr:0: :-fno-rename-registers
+rf:0: :-fno-reorder-functions
+rcl:0: :-fno-rerun-cse-after-loop
+sib:0: :-fno-sched-interblock
+ss:0: :-fno-sched-spec
+sid:0: :-fno-sched-stalled-insns-dep
+sin:0: :-fno-schedule-insns
+se2:0: :-fno-schedule-insns2
+sa:0: :-fno-section-anchors
+siu:0: :-fno-split-ivs-in-unroller
+fwt:0: :-fno-split-wide-types
+sta:0: :-fno-strict-aliasing
+tj:0: :-fno-thread-jumps
+tr:0: :-fno-toplevel-reorder
+tm:0: :-fno-trapping-math
+ccp:0: :-fno-tree-ccp
+cp:0: :-fno-tree-copy-prop
+cpr:0: :-fno-tree-copyrename
+cse:0: :-fno-tree-cselim
+tdc:0: :-fno-tree-dce
+do:0: :-fno-tree-dominator-opts
+tds:0: :-fno-tree-dse
+fre:0: :-fno-tree-fre
+lim:0: :-fno-tree-loop-im
+liv:0: :-fno-tree-loop-ivcanon
+lpo:0: :-fno-tree-loop-optimize
+rea:0: :-fno-tree-reassoc
+#sal:0: :-fno-tree-salias
+scp:0: :-fno-tree-scev-cprop
+snk:0: :-fno-tree-sink
+sra:0: :-fno-tree-sra
+stp:0: :-fno-tree-store-ccp
+scy:0: :-fno-tree-store-copy-prop
+ter:0: :-fno-tree-ter
+vlv:0: :-fno-tree-vect-loop-version
+vrp:0: :-fno-tree-vrp
+uat:0: :-fno-unit-at-a-time
+vt:0: :-fno-var-tracking
+web:0: :-fno-web
Index: contrib/genopts/input/Os-disabled.in
===================================================================
--- contrib/genopts/input/Os-disabled.in	(revision 0)
+++ contrib/genopts/input/Os-disabled.in	(revision 0)
@@ -0,0 +1,54 @@
+# These options are disabled by default for -Os on powerpc64-linux.
+#
+aj:0: :-falign-jumps
+alb:0: :-falign-labels
+# unrecognized command line option
+#ang:0: :-fargument-noalias-globals
+an:0: :-fargument-noalias:-fargument-noalias-anything
+aut:0: :-fasynchronous-unwind-tables:-fexceptions:-freorder-blocks-and-partition:-funwind-tables:-fmodulo-sched
+bbe:0: :-fbtr-bb-exclusive
+csb:0: :-fcse-skip-blocks
+clr:0: :-fcx-limited-range
+ds:0: :-fdata-sections
+#db:0: :-fdelayed-branch
+fmo:0: :-ffinite-math-only
+fs:0: :-ffloat-store
+fa:0: :-fforce-addr
+gar:0: :-fgcse-after-reload
+gla:0: :-fgcse-las
+gsm:0: :-fgcse-sm
+icp:0: :-fipa-cp
+imr:0: :-fipa-matrix-reorg
+#ipt:0: :-fipa-pta
+mac:0: :-fmerge-all-constants
+# for now, don't run this at the same time as reorder-blocks-and-partition
+#ms:0: :-fmodulo-sched
+nce:0: :-fnon-call-exceptions
+ps:0: :-fpack-struct
+pl:0: :-fpeel-loops
+pc:0: :-fpredictive-commoning
+# not supported with -Os
+#pla:0: :-fprefetch-loop-arrays
+rb:0: :-freorder-blocks
+#rbp:0: :-freorder-blocks-and-partition
+rms:0: :-freschedule-modulo-scheduled-loops
+rm:0: :-frounding-math
+#ras:0: :-frtl-abstract-sequences
+ssl:0: :-fsched-spec-load:-fsched-spec-load-dangerous
+ssi:0: :-fsched-stalled-insns
+#sus:0: :-fsched2-use-superblocks
+sn:0: :-fsignaling-nans
+tv:0: :-ftrapv
+ch:0: :-ftree-ch
+ll:0: :-ftree-loop-linear
+lrs:0: :-ftree-lrs
+pre:0: :-ftree-pre
+unr:0: :-funroll-loops:-funroll-all-loops
+ulo:0: :-funsafe-loop-optimizations
+umo:0: :-funsafe-math-optimizations
+ul:0: :-funswitch-loops
+vtu:0: :-fvar-tracking-uninit -g
+veu:0: :-fvariable-expansion-in-unroller
+vpt:0: :-fvpt
+###wp:0: :-fwhole-program
+wrv:0: :-fwrapv
Index: contrib/genopts/input/pic.in
===================================================================
--- contrib/genopts/input/pic.in	(revision 0)
+++ contrib/genopts/input/pic.in	(revision 0)
@@ -0,0 +1 @@
+pic:0: :-fpic:-fPIC:-fpie
Index: contrib/genopts/input/dbg.in
===================================================================
--- contrib/genopts/input/dbg.in	(revision 0)
+++ contrib/genopts/input/dbg.in	(revision 0)
@@ -0,0 +1 @@
+dbg:0: :-g:-g3:-g -feliminate-dwarf2-dups:-g3 -feliminate-dwarf2-dups
Index: contrib/genopts/input/vect.in
===================================================================
--- contrib/genopts/input/vect.in	(revision 0)
+++ contrib/genopts/input/vect.in	(revision 0)
@@ -0,0 +1,2 @@
+alt:1:-maltivec -mabi=altivec
+vect:1: :-ftree-vectorize:-ftree-vectorize -fvect-cost-model
Index: contrib/genopts/input/lev.in
===================================================================
--- contrib/genopts/input/lev.in	(revision 0)
+++ contrib/genopts/input/lev.in	(revision 0)
@@ -0,0 +1 @@
+lev:1:-O1:-O2:-O3:-Os




More information about the Gcc-patches mailing list