Table of Contents

Name

cbsplit - split Fortran common blocks

Synopsis

cbsplit infile outfile { infile outfile }*

Description

The cbsplit program splits up Fortran common blocks into pieces that are as small as possible, given the reshaping in the program. This can in many cases lead to common blocks which consist of only one field, in which case a single global variable of the appropriate type can be used. The idea is that some interprocedural analysis that deals only with var_syms and can't handle the offsets and overlapping of a common block will be able to do more because more things will be in their own var_syms.

Note that to be correct, this pass must know how all the functions in the entire program use their common blocks before it can split anything. Hence if the program is in multiple files, the files must be linked before this pass is run and this pass should be run on all simultaneously.

Options

-assume-no-reshape-communication
Assume that if there is any reshaping of common blocks, either through equivalences or different shapes in different procedures, that there is no communication from one shape to another. That is, assume it is safe to make different shapes not overlap one another at all. With this assumption, every field of every common block is made into its own independent global variable unless there is some initialization data for the common block. If the common block has initialization data, it is handled as if this flag weren't used.

See Also

sf2c(1) , fixfortran(1) , suif(1)

History

This program was written by Chris Wilson.


Table of Contents