Man page for fortsplit.1
Table of Contents

NAME

fortsplit - split out and convert possible Fortran procedures

SYNOPSIS

fortsplit { -remove | -mark } { -fortran-file fortran-output-file } infile outfile { infile outfile }*

DESCRIPTION

The fortsplit program splits procedures in a SUIF file into those that can be translated into Fortran and those that cannot. By default, those procedures that can be translated into Fortran are translated. Those that cannot have ``not Fortran reason'' annotations put on their proc_syms with strings indicating what was wrong. This program also writes ``Fortran unfixables called'' annotations when appropriate, listing which procedures are called by the given procedure which prevent conversion to Fortran in an unfixable way.

The idea is to allow some procedures to be written out as Fortran while the rest remain to be written out in a C file. Then each output is run through the appropriate compiler on the target machine and then linked together. This is often beneficial because a Fortran compiler on the target machine may be able to do better optimizations because of special assumptions that can be made in Fortran, for example parameter alias information which cannot be easily communicated to a C compiler.

OPTIONS

-remove
Remove the bodies of all procedures successfully translated to Fortran. If this option is used, code can be generated for the remaining procedures some other way, for example by s2c, and there will be no duplication with the Fortran output. The default is to leave all procedures in the output SUIF file even if they've been converted to Fortran.

-mark
Do not produce any Fortran output, just write ``not Fortran reason'' and ``Fortran unfixables called'' annotations as appropriate on proc_syms of procedures that cannot be converted to Fortran explaining why they cannot.

-fortran-file fortran-output-file
Use fortran-output-file as the file name for the Fortran output. If this option is not used, the Fortran will be written to standard output.

-omit-header
Omit the header comments usually prepended to the output Fortran file that give information on how the Fortran file was generated.

SEE ALSO

s2c(1)

HISTORY

This program was written by Chris Wilson.


Table of Contents