ip1arraysizes - do one level interprocedural propagation of array sizes
ip1arraysizes [ options ] infile outfile { infile outfile }*
The ip1arraysizes program does very simple interprocedural propagation of the sizes of arrays pointed to by pointer parameters. It does this propagation through a single level of procedure calls. If the sizes of the arrays are available at all callsites and agree for a given parameter for a given procedure, and the type of the parameter in the procedure body is an array with unknown outer dimension, the unknown outer dimension is replaced with the constant calculated from the size of the array passed in. Because only one level of procedure calls is handled, a very efficient algorithm is used even though it's interprocedural. Even the limited power of staying with a single level of procedure call is still enough to help in practice. The algorithm uses only one procedure in memory at any given time. It makes two passes; each procedure is read twice and written once, so it should take less time than any two ordinary intraprocedural passes.
There are currently no command-line options.
This program was written by Chris Wilson.