GNU Superoptimizer

GNU Superoptimizer is a project that uses an approach to finding the shortest instruction sequence for a given function.
Download

GNU Superoptimizer Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Torbjorn Granlund
  • Publisher web site:
  • ftp://ftp.gnu.org/gnu/superopt

GNU Superoptimizer Tags


GNU Superoptimizer Description

GNU Superoptimizer is a project that uses an approach to finding the shortest instruction sequence for a given function. GNU Superoptimizer is a project that uses an approach to finding the shortest instruction sequence for a given function.The superoptimizer is a function sequence generator that uses an exhaustivegenerate-and-test approach to finding the shortest instruction sequence fora given function. You have to tell the superoptimizer which function andwhich CPU you want to generate code for, and how many instructions you canaccept.The superoptimizer can't generate very long sequences, unless you have avery fast computer or very much spare time. The time complexity of the usedalgorithm is approximately 2n O(m n )where m is the number of available instructions on the architecture and n isthe shortest sequence for the goal function. The practical sequence lengthlimit depends on the target architecture and goal function arity; In mostcases it is about 5, but for a rich instruction set as the HPPA it is just4. The longest sequence ever generated was for the MC68020 and 7instructions long. It took several weeks to generate it...The superoptimizer can't guarantee that it finds the best possibleinstruction sequences for all possible goal functions. For example, itdoesn't even try to include immediate constants (other that -1, 0, +1, andthe smallest negative and biggest positive numbers) in the sequences.Other reasons why not optimal sequences might be found is that not allinstructions are included, not even in their register-only form. Also, someinstructions included might not be correctly simulated. If you encounterany of these problems, please report them to the address below.WARNING! The generated sequences might be incorrect with a very smallprobability. Always make sure a sequence is correct before using it. Sofar, I have never encountered any incorrect sequences. If you find one,please let me know about it!Having said this, note that the superoptimizer practically always findsoptimal and correct sequences for functions that depend on registers only.What's New in This Release:· Delete unused variable tot_bits.· Make state1 have char type.· Use random() on alpha, since srand48 doesn't work there.· Return small numbers with high probability.


GNU Superoptimizer Related Software