Patchwork GNU Superopt Updated README

login
register
mail settings
Submitter Joe Seymour
Date Sept. 7, 2010, 10:36 a.m.
Message ID <201009071036.o87Aa1a6005906@brsbs01.icerasemi.com>
Download mbox | patch
Permalink /patch/63985/
State New
Headers show

Comments

Joe Seymour - Sept. 7, 2010, 10:36 a.m.
In addition to the patches, here's an updated README:

Patch

--- /home/seymour/superopt-2.5/README	1995-05-17 17:13:52.000000000 +0100
+++ README	2010-09-06 17:57:42.327956000 +0100
@@ -22,14 +22,11 @@  cases it is about 5, but for a rich inst
 instructions long.  It took several weeks to generate it...
 
 The superoptimizer can't guarantee that it finds the best possible
-instruction sequences for all possible goal functions.  For example, it
-doesn't even try to include immediate constants (other that -1, 0, +1, and
-the smallest negative and biggest positive numbers) in the sequences.
-
-Other reasons why not optimal sequences might be found is that not all
-instructions are included, not even in their register-only form.  Also, some
-instructions included might not be correctly simulated.  If you encounter
-any of these problems, please report them to the address below.
+instruction sequences for all possible goal functions.  This is
+because not all instructions are included, not even in their
+register-only form.  Also, some instructions included might not be
+correctly simulated.  If you encounter any of these problems, please
+report them to the address below.
 
 WARNING!  The generated sequences might be incorrect with a very small
 probability.  Always make sure a sequence is correct before using it.  So
@@ -70,8 +67,10 @@  superoptimizer and `make install-all' to
 
 To run the superoptimizer, type
 
-	superopt -f<goal-function> | -all  [-assembly] [-max-cost n]
-	   [-shifts] [-extracts] [-no-carry-insns] [-extra-cost n]
+        superopt -f<goal-function> [-assembly] [-max-cost n] [-min-cost n]
+                [-consts] [-clist <n>...] [-cpot] [-cpotmo]
+                [-no-carry-insns] [-extra-cost n] [-nl] [-limit n]
+
 
 and wait until the found instructions sequences are printed.  For example,
 
@@ -83,9 +82,10 @@  will print all sequences computing the s
 
 See below for some examples of possible goal functions.
 
-By default, the superoptimizer doesn't try all immediate shift counts.  To
-enable all shift counts, pass -shifts as a command line option.  To enable
-all bit field extracts, use -extracts.
+By default, the superoptimizer doesn't try all immediate shift counts.
+To enable all shift counts, pass -shifts as a command line option.  To
+enable all bit field extracts, use -extracts. To enable immediates for
+non-shift instructions use -consts, by default only -1 0 1 are tried.
 
 			OPTIONS
 
@@ -104,6 +104,14 @@  Option names may be abbreviated.
 	stop the search if no instruction sequence of that length or
 	shorter is found.  By default this is 4.
 
+-min-cost n
+        Specify a minimum sequence length. May be used to carry a
+        search on from a point after failing for shorter sequences. 
+
+-limit n
+        Limit the number of results to n sequences. May be used to
+        terminate the search early after a few sequences have been found.
+
 -extra-cost n
 	Search for sequences n more expensive than the cheapest found
 	sequence.  Default is 0 meaning that only the cheapest sequence(s)
@@ -121,6 +129,24 @@  Option names may be abbreviated.
 	Include all bit field extracts supported by the target architecture
 	in the search.  This slows down the search considerably.
 
+-consts
+        Include all immediate values for instructions that support
+        them. This slows down the search massivley, using it for sequences
+        longer than 3 instructions will take a lot of time.
+
+-cpot
+        Include all powers of two as immediate values. This may be
+        used in combination with other constant flags.
+
+-cpotmo
+        Include all powers of two minus one as immediate values. This
+        may be used in combination with other constant flags.
+
+-clist n ...
+        Include values specified as immediates, this is useful if a
+        goal function has magic constants in. This may be used in
+        combination with other constant flags.
+
 -f<goal-function-name>
 	
 	where <goal-function-name> is one of eq, ne, les, ges, lts, gts,