The gcdm option invokes the gcdm960 global optimization decision maker during the link process. The decision maker then invokes the compiler and linker as necessary to perform program-wide optimizations.
The gcdm option has the following syntax:
{ - | / } gcdm,argument[,argument]...
As with other options, you can use the / delimiter only on DOS. The gcdm option arguments and the sections that describe them are described below. There are several classes of gcdm option arguments, called controls in this hypertext.
Substitution Controls (subst,arg[,arg]... and nosubst,module-set)
where arg is {module-set}{option-list}
External Reference Controls ([no]ref=module-set)
Inlining Control (inline=n)
Profile Control (iprof=file)
Memory Controls (sram=start,end[,start,end]... and m=start,len[,start,len]...)
Dryrun Control (dryrun)
Report Controls (dec=file, rdecisions, rcall-graph, rprofile, rreverse, rsummary, rvariables)
As shown above, gcdm option arguments are a mixture of keywords and user-supplied identifiers. In this hypertext node, gcdm option arguments are called controls unless this causes ambiguity.
The substitution controls allow you to substitute optimized modules in your application (subst), and to suppress unintended substitutions (nosubst). The complete substitution specification and substitution suppression syntax is:
subst,arg[,arg]... and nosubst,module-set
where arg is {module-set}{option-list}
This syntax is discussed in the following paragraphs.
If a given object module is named in multiple subst or nosubst options, the last subst or nosubst which names that module applies. In addition to providing for control over which modules are affected, the substitution controls allow fine control of how affected modules are optimized. The following subsections describe substitution and substitution suppression. Detailed information on controlling optimizations is presented in the discussion of option-list in the immediately following subsection.
subst={module-set}{option-list}
In the linked program, gcdm,subst={module-set}{option-list} causes substitution of modules optimized according to the option-list for all of the modules in module-set.
Note that no space is allowed between module-set and option-list.
A module-set specification is a string supplied by the user that names the modules to be operated on by the gcdm option. For a description of how to specify a module-set, see the Module-Set Specification section.
An option-list consists of a single +, meaning to perform no substitution, or it consists of one or more of the substitution options discussed in three categories:
Note that the first two categories are mutually exclusive; but you can use substitution options from the third category with those from either of the first two categories.
+O5
This whole-program optimization substitution option selects program-wide optimizations, including global function inlining, superblock formation, and global alias analysis. The whole-program optimization option is not allowed in an option-list with module-local (Category 2) options.
+fprof | +O0 | +O1 | +O2 | +O3 | +O4
These module-local substitution options correspond to the gcc960 and ic960 drivers' -fprof (Instrument) and -On (Optimize) options. The module-local substitution options are not allowed in an option-list with the whole-program optimization (Category 1) option.
+g | +asm_pp+prog | +clist+arg | +fstring
These can be used with either the whole-program or module-local substitution options in Categories 2 and 3, above.
nosubst=module-set
The nosubst=module-set argument suppresses substitution for the named modules. This is equivalent to subst=module-set+ (the option-list consists of only a + character). nosubst is typically used to exclude a subset of modules from a previous subst.
ref=module-set
noref=module-set
These reference controls cause gcdm960 to assume/not assume that functions or data defined in the objects named by module-set are referenced outside the set of object files presented to the linker.
ref would normally be used to keep the global decision making and optimization step from discarding modules that appear to be unused.
noref is typically used to exclude a subset of modules from a previous ref.
The last ref or noref to name a given module applies.
inline=n
This gcdm option argument controls how aggressively global inlining decisions are made.
n defaults to 3, and n must be >= 0 and less than 5.
iprof=file
This control causes the profile information in file to be incorporated into program-wide optimization decisions.
file is a raw profile or a self-contained profile.
sram=hexstart,hexend[,hexstart,hexend]...
m=hexstart,hexlen[,hexstart,hexlen]...
These gcdm option arguments cause global variables to be automatically allocated to the indicated SRAM area available in some 80960 processor models, but could be any fast memory region reserved for this purpose.
dryrun
The dryrun argument echoes the commands which would be executed to implement all specified subst options into the report file, without actually doing the optimization work.
The gcdm option arguments listed here allow for creation of various optimization reports and naming the report file.
dec=file
Causes the optimization decisions report file to be file, instead of stdout.
dryrun
Echoes the commands which would be executed to implement all specified subst options into the report file, without actually doing the optimization work.
rsummary
Prints a summary of program-wide optimization decisions to the report file.
rdecisions
Prints information about program-wide optimization decisions to the report file.
rcall-graph
Prints a call graph to the report file.
rreverse
Prints a reversed call graph to the report file.
rprofile
Prints the profile counts for the basic blocks which were hit to the report file.
rvariables
Lists the variables allocated to fast memory with -m or -sram to the report file.
A module-set selects a subset of zero or more modules from the set consisting of all eligible modules in the program. A module-set specification has the format:
[ archive ] : module
The following rules govern module-set selection.
Return
to the top of this page.