NAME acc - C compiler SYNOPSIS acc [ -Aname [(tokens) ] ] [ -a ] [ -B [static|dynamic] ] [ -C ] [ -c ] [ -cg89 ] [ -cg92 ] [ -Dname [=token ] ] [ -dalign ] [ -d [y|n] ] [ -dryrun ] [ -E ] [ -fast ] [ -fd ] [ -flags ] [ -fnonstd ] [ -fns ] [ -fround=r ] [ -fsimple[=n] ] [ -fsingle ] [ -ftrap=t ] [ -G ] [ -g ] [ -H ] [ -help ] [ -hname ] [ -Idir ] [ -inline=[ff11,,......,,ffnn] ] [ -KPIC ] [ -Kpic ] [ -keeptmp ] [ -Ldir ] [ -lname ] [ -libmieee ] [ -libmil ] [ -M ] [ -misalign ] [ -misalign2 ] [ -mt ] [ -native ] [ -nolib ] [ -nolibmil ] [ -noqueue ] [ -O[1|2|3|4|5] ] [ -o outputfile ] [ -P ] [ -p ] [ -pg ] [ -PIC ] [ -pic ] [ -Qdir dir ] [ -Qoption c arg ] [ -Qpath dir ] [ -Qproduce srctype ] [ -qdir dir ] [ -qoption c arg ] [ -qpath dir ] [ -qproduce srctype ] [ -R dir[:dir] ] [ -S ] [ -s ] [ -sb ] [ -sbfast ] [ -strconst ] [ -temp=dir ] [ -time ] [ -Uname ] [ -unroll =n ] [ -V ] [ -v ] [ -vc ] [ -w ] [ -X [a |c |s |t ]] [ -xa ] [ -xarch=a ] [ -xautopar ] [ -xcache=c ] [ -xCC ] [ -xcg89 ] [ -xcg92 ] [ -xchip=c ] [ -xdepend ] [ -xe ] [ -xexplicitpar ] [ -xF ] [ -xhelp=f ] [ -xildoff ] [ -xildon ] [ -xinline=[ff11,,......,,ffnn] ] [ -xlibmieee ] [ -xlibmil ] [ -xlicinfo ] [ -xlic_lib_=ll ] [ -xloopinfo ] [ -xM ] [ -xM1 ] [ -xMerge ] [ -xnolib ] [ -xnolibmil ] [ -xO[1|2|3|4|5] ] [ -xP ] [ -xparallel ] [ -xpg ] [ -xprofile=p ] [ -xreduction ] [ -xregs=r ] [ -xrestrict=f ] [ -xs ] [ -xsafe=mem ] [ -xsb ] [ -xsbfast ] [ -xsfpconst ] [ -xspace ] [ -xstrconst ] [ -xtarget=t ] [ -xtemp=dir ] [ -xtime ] [ -xtransition ] [ -xunroll=n ] [ -xvpara ] [ -Y,dir ] [ -Zll ] [ -Zlp ] [ -Ztha ] DESCRIPTION acc (SPARC only) is not intended to be used directly on Solaris. The sole purpose for making it available on Solaris is to enable /usr/ucb/cc. The package SUNWscpu must be installed to use this. The options for /usr/ucb/cc are the same as for acc and are described here. acc is the C compiler. It translates programs written in the C programming language into executable load modules, or into relocatable binary programs for subsequent loading with the ld(1) link editor. In addition to the many options, acc accepts several types of filename arguments. For instance, files with names end- ing in .c are taken to be C source programs. They are compiled, and each resulting object program is placed in the current directory. The object file is named after its source file - the suffix .o replacing .c in the name of the object. In the same way, files whose names end with .s are taken to be assembly source programs. They are assembled, and produce .o files. Filenames ending in .il are taken to be inline expansion code template files; these are used to expand calls to selected routines in-line when code optimi- zation is enabled. See FILES, below for a complete list of compiler-related filename suffixes. Other arguments refer to assembler or loader options, object programs, or object libraries. Unless -c, -S, -E -P or -Qproduce is specified, these programs and libraries, together with the results of any specified compilations or assemblies, are linked (in the order given) to produce an output file named a.out. You can specify a name for the executable by using the -o option. If a single file is compiled and linked all at once, the intermediate files are deleted. See option -Yc, dir to change the default directories used for finding libraries. dir is a colon-separated path list. The default library search order for cc is: /opt/SUNWspro/SC5.0/lib /usr/ccs/lib /usr/lib OPTIONS All platform-specific options are "silently accepted" on all platforms. Any exceptions to this rule are noted under the specific option. When debugging or profiling objects are compiled using the -g or -pg options, respectively, the ld command for linking them should also contain the appropriate option. See ld(1) for link-time options. -a Insert code to count how many times each basic block is executed. This is the old style of basic block profil- ing for tcov. See -xprofile=tcov for information on the new style of profiling and the tcov(1) man page for more details. Invokes a runtime recording mechanism that creates a .d file for every .c file (at normal termination). The .d file accumulates execution data for the corresponding source file. The tcov(1) utility can then be run on the source file to generate statistics about the pro- gram. This option is incompatible with -g . -Aname[((tokens))] Associate name as a predicate with the specified tokens as if by a ##aasssseerrtt preprocessing directive. Preassertions: system(unix) cpu(sparc) machine(sparc) The above are not predefined in -Xc mode. If -A is followed by a dash (-) only, it causes all predefined macros (other than those that begin with __) and predefined assertions to be forgotten. -B [static|dynamic] -B dynamic causes the link editor to look for files named lliibbx..ssoo and then for files named lliibbx..aa when given the --llx option. -B static causes the link editor to look only for files named lliibbx..aa. This option may be specified multiple times on the command line as a toggle. This option and its argument are passed to ld. -C Cause the preprocessor to pass along all comments other than those on preprocessing directive lines. -c Suppress linking with ld(1) and produce a .o file for each source file. A single object file can be named explicitly using the -o option. -cg89 This option is a macro for: -xarch=v7 -xchip=old -xcache=64/32/1. -cg92 This option is a macro for: -xarch=v8 -xchip=super -xcache=16/32/4:1024/32/1. -Dname[=token] Associates name with the specified token as if by a ##ddeeffiinnee preprocessing directive. If no ==token is specified, the token 11 is supplied. Predefinitions: sparc sun unix The above are not predefined in -Xc mode. These predefinitions are valid in all modes: __sparc __unix __sun __BUILTIN_VA_ARG_INCR __SUNPRO_C=0x420 __SVR4 __`uname -s` `uname -r` -dalign Generate double-word load/store instructions whenever possible for improved performance. Assumes that all double and long long type data are double-word aligned, and should not be used when correct alignment is not assured. -d [y|n] -dy specifies dynamic linking, which is the default, in the link editor. -dn specifies static linking in the link editor. This option and its argument are passed to lldd. -dryrun Show but do not execute the commands constructed by the compilation driver. -E Preprocess only the named C files and send the result to the standard output. The output will contain preprocessing directives for use by the next pass of the compilation system. -fast Select the optimum combination of compilation options for speed. This should provide close to the maximum performance for most realistic applications. Modules compiled with -fast , must also be linked with -fast . It is a convenience option, and it chooses the fastest code generation option available on the compile-time hardware, the optimization level -O2, a set of inline expansion templates, the -fns option, the -ftrap=%none option, and the -dalign option. If you combine -fast with other options, the last specification applies. The code generation option, the optimization level and using inline template files can be overridden by subsequent switches. For example, although the optimization part of -fast is -O4 , the optimization part of -fast -O1 is -O1 . Do not use this option for programs that depend on IEEE standard exception handling; you can get different numerical results, premature program termination, or unexpected SIGFPE signals. -fd Report old-style function definitions and declarations. -flags Print a summary of each compiler option. -fnonstd This option is a macro for -fns and -ftrap=common. -fns Turn on the SPARC nonstandard floating-point mode. The default is the SPARC standard floating-point mode. If you compile one routine with -fns, then compile all the program routines with the -fns option; otherwise, you can get unexpected results. -fround=r Set the IEEE 754 rounding mode that is established at runtime during the program initialization. r must be one of: nearest, tozero, negative, positive. The default is -fround=nearest. The meanings are the same as those for the iieeeeee_ffllaaggss subroutine. If you compile one routine with -fround=r, compile all the program routines with the same -fround=r option; otherwise, you can get unexpected results. -fsimple[=n] Allow the optimizer to make simplifying assumptions concerning floating-point arithmetic. If n is present, it must be 0, 1, or 2. The defaults are: o With no -fsimple[=n], the compiler uses -fsimple=0. o With only -fsimple, no =n, the compiler uses -fsim- ple=1. -fsimple=0 Permit no simplifying assumptions. Preserve strict IEEE 754 conformance. -fsimple=1 Allow conservative simplifications. The resulting code does not strictly conform to IEEE 754, but numeric results of most programs are unchanged. With -fsimple=1, the optimizer can assume the follow- ing: o The IEEE 754 default rounding/trapping modes do not change after process initialization. o Computations producing no visible result other than potential floating- point exceptions may be deleted. o Computations with Infinity or NaNs as operands need not propagate NaNs to their results. For example, x*0 may be replaced by 0. o Computations do not depend on sign of zero. With -fsimple=1, the optimizer is not allowed to optim- ize completely without regard to roundoff or excep- tions. In particular, a floating-point computation can- not be replaced by one that produces different results with rounding modes held constant at run time. -fast implies -fsimple=1. -fsimple=2 Permit aggressive floating point optimizations that may cause many programs to produce different numeric results due to changes in rounding. For example, permit the optimizer to replace all computations of x/y in a given loop with x*z, where x/y is guaranteed to be evaluated at least once in the loop, z=1/y, and the values of y and z are known to have constant values during execution of the loop. Even with -fsimple=2, the optimizer still is not per- mitted to introduce a floating point exception in a program that otherwise produces none. -fsingle ( -Xt and -Xs modes only). Causes the compiler to evaluate float expressions as single precision rather than double precision. (This option has no effect if the compiler is used in either -Xa or -Xc modes, as float expressions are already evaluated as single pre- cision.) -ftrap=t Set the IEEE 754 trapping mode in effect at startup. t is a comma-separated list that consists of one or more of the following: %all, %none, common, [no%]invalid, [no%]overflow, [no%]underflow, [no%]division, [no%]inexact. The default is -ftrap=%none. This option sets the IEEE 754 trapping modes that are established at program initialization. Processing is left-to-right. The common exceptions, by definition, are invalid, division by zero, and overflow. Example: -ftrap=%all,no%inexact means set all traps, except inexact. The meanings are the same as for the iieeeeee_ffllaaggss subrou- tine, except that: o %all turns on all the trapping modes. o %none, the default, turns off all trapping modes. o A no% prefix turns off that specific trapping mode. If you compile one routine with -ftrap=t, compile all routines of the program with the same -ftrap=t option; otherwise, you can get unexpected results. -G Direct the link editor to produce a shared object rather than a dynamically linked executable. This option is passed to lldd. It cannot be used with the --ddnn option. -g Produce additional symbol table information for dbx(1). The -g option makes -xildon the default incremental linker option. See -xildon. Invoke ild in place of ld unless any of the following are true: The -G option is present, the -xildoff option is present, any source files are named on the command line. When used with the --OO option, a limited amount of debugging is available. The combination, --xxOO44 --gg, turns off the inlining that you usually get with --xxOO44. -H Print, one per line, the path name of each file included during the current compilation on the standard error output. -help Display a one-line summary of compiler options. -hname Names a shared dynamic library. The -hname option assigns a name to a shared dynamic library. This pro- vides versions of a shared dynamic library. In general, the name after -h should be exactly what you have after the -o. You may insert a space between -h and name. This option is passed to ld. -Idir Add dir to the list of directories in which to search for #include files with relative filenames (not begin- ning with slash /). The preprocessor first searches for #include files in the directory containing source- file, then in directories named with -I options (if any), and finally, in /usr/include. -inline=[f1,...,fn] For user-written routines, try to inline only those named in the list f1 to fn. It tries routines only in the file being compiled. The list is a comma-separated list of functions and subroutines. If compiling with -O3, this can increase optimization by inlining some routines. The -O3 option inlines none by itself. If compiling with -O4, this can decrease optimization by restricting inlining to only those routines in the list. With -O4, the compiler normally tries to inline all user-written subroutines and functions. When xin- line= is specified with an empty rrlliisstt, it indicates that none of the routines in the source file are to be inlined. A routine is not inlined if any of the following apply (no warning): o Optimization is less than --OO33 o The routine cannot be found o Inlining the routine does not look profitable or safe to iropt o The source for the routine is not in the file being compiled -KPIC Like -Kpic, but allows the global offset table to span the range of 32-bit addresses in those rare cases where there are too many global data objects for -Kpic. -Kpic Produce position-independent code. Each reference to a global datum is generated as a dereference of a pointer in the global offset table. Each function call is gen- erated in pc-relative addressing mode through a pro- cedure linkage table. The size of the global offset table is 8K on SPARC processors. -keeptmp Retains files created during compilation, rather than automatically deleting them. -Ldir Add dir to the list of directories containing object- library routines (for linking using ld(1). -lname Link with object library name (for ld(1)). This option must follow the sourcefile arguments. -libmieee Force IEEE 754 style return values for math routines in exceptional cases. In such cases, no exeception mes- sage will be printed, and errno should not be relied on. -libmil Inlines some library routines for faster execution. -M Run only the macro preprocessor (cpp) on the named C programs, requesting that it generate makefile depen- dencies and send the result to the standard output (see make(1) for details about makefiles and dependencies). -misalign --mmiissaalliiggnn assumes that data is not properly aligned and thus very conservative loads and stores must be used for data, that is, one byte at a time. Using this option can cause significant performance degradation when running the program. -misalign2 --mmiissaalliiggnn22, like --mmiissaalliiggnn, assumes that data is not properly aligned, but that data is at least half-word aligned. Though conservative uses of loads and stores must be used for data, the performance degradation when running a program should be less than for --mmiissaalliiggnn. -mt Passes D_REENTRANT to preprocessor. Appends --ll thread. If you are doing your own multithread coding, you must use this option in the compile and link steps. To obtain faster execution, this option requires a mul- tiprocessor system. On a single-processor system, the resulting executable usually runs more slowly with this option. -native Ascertain which code-generation options are available on the machine running the compiler, and direct the compiler to generate code targeted for that machine. This option is a synonym for -xtarget=native . The -fast macro includes -native in its expansion. -nolib Does not link any libraries by default; that is, no -l options are passed to ld . Normally, the acc driver passes -lm -lansi -lc to ld . When you use -nolib , you have to pass all -l options yourself. For example: acc test.c -nolib -lansi -Bstatic -lm -Bdynamic -lc links libm statically and the other libraries dynami- cally. -nolibmil Reset -fast so that it does not include inline tem- plates. Use this after the -fast option: cc fast nolibmil ... -noqueue Tells the compiler not to queue this compile request if a license is not available. -O[1|2|3|4|5] Optimize the object code. May be used with -g, but not with --xxaa. Specifying -O is equivalent to specifying -O2. Level is one of: 1 Do basic local optimization (peephole). 2 Do basic local and global optimization. This is induction variable elimination, local and global common subexpression elimination, algebraic simplification, copy propagation, constant propagation, loop-invariant optimi- zation, register allocation, basic block merging, tail recursion elimination, dead code elimination, tail call elimination and complex expression expansion. The -O2 level does not assign global, exter- nal, or indirect references to registers. It treats these references and definitions as if they were declared "volatile." In general, the -O2 level results in minimum code size. 3 Beside what -O2 does, this also optimizes references and definitions for external vari- ables. Loop unrolling and software pipelin- ing are also performed. The -O3 level does not trace the effects of pointer assignments. When compiling either device drivers, or pro- grams that modify external variables from within signal handlers, you may need to use the volatile type qualifier to protect the object from optimization. In general, the -O3 level results in increased code size. 4 Besides what -O3 does, this also does automatic inlining of functions contained in the same file; this usually improves execution speed. The -O4 level does trace the effects of pointer assignments. In general, the -O4 level results in increased code size. 5 Generate the highest level of optimization. Use optimization algorithms that take more compilation time or that do not have as high a certainty of improving execution time. Optimization at this level is more likely to improve performance if it is done with pro- file feedback. If the optimizer runs out of memory, it tries to recover by retrying the current procedure at a lower level of optimization and resumes subsequent procedures at the original level specified in the command-line option. If you optimize at -O3 or -O4 with very large pro- cedures (thousands of lines of code in the same procedure), the optimizer may require a large amount of virtual memory. In such cases, machine performance may degrade. -o outputfile Name the output file outputfile. outputfile must have the appropriate suffix for the type of file to be pro- duced by the compilation (see FILES, below). outputfile cannot be the same as sourcefile (the compiler will not overwrite the source file). -P Preprocess only. Puts the output in a file with a .i suffix. The output will not contain any preprocessor line directives, unlike the -E option. -p Prepare the object code to collect data for profiling with prof(1). Invokes a run-time recording mechanism that produces a mon.out file (at normal termination). -pg Prepare the object code to collect data for profiling with gprof(1). Invokes a run-time recording mechanism that produces a gmon.out file (at normal termination). -PIC Same as --KKPPIICC. -pic Same as --KKppiicc. -Qdir dir Look for compiler components in directory dir. -Qoption c arg Pass the option arg to the component c. The option must be appropriate to that component and may begin with a minus sign. c can be one of: acomp, fbe cg, iropt, or ld. -Qpath dir Insert directory dir into the compilation search path. The path will be searched for alternate versions of the compilation programs, such as acomp(1), and ld(1). This path will also be searched first for certain relo- catable object files that are implicitly referenced by the compiler driver, for example *crt*.o and bb_link.o. -Qproduce srctype Produce source code of the type sourcetype. sourcetype can be one of: .i Preprocessed C source. .o Object file. .s Assembler source. -qdir dir Same as -Qdir dir. -qoption c arg Same as -Qoption c arg. -qpath dir Same as -Qpath dir. -qproduce srctype Same as -Qproduce srctype. -R dir[:dir] A colon-separated list of directories used to specify library search directories to the runtime linker. If present and not null, it is recorded in the output object file and passed to the runtime linker. If both LD_RUN_PATH and the -R option are specified, the -R option takes precedence. -S Do not assemble the program but produce an assembly source file. -s Remove all symbolic debugging information from the out- put object file. Passed to ld(1). -sb Generate extra symbol table information for the Sun Source Code Browser. -sbfast Create the database for the Sun Source Code Browser, but do not actually compile. -strconst Insert string literals into the read-only data section of the text segment instead of the data segment. -temp=dir Set directory for temporary files to be dir. -time Report execution times for the various compilation passes. -Uname Cause any definition of name to be undefined, as if by a ##uunnddeeff preprocessing directive. If the same name is specified for both --DD and --UU, name is not defined, regardless of the order of the options. -unroll=n Specifies whether or not the compiler optimizes (unrolls) loops. n is a positive integer. When n is 1, it is a command and the compiler unrolls no loops. When n is greater than 1, the --uunnrroollll==n merely suggests to the compiler that unrolled loops be unrolled n times. -V Print the name and version ID of each pass as the com- piler executes. -v Verbose. Print the version number of the compiler and the name of each program it executes. -vc Directs the compiler to perform stricter semantic checks and enable other lint-like checks. -w Do not print warnings. -X[a|c|s|t] Specify the degree of conformance to the ANSI C stan- dard. The degree of conformance can be one of the fol- lowing: a (ANSI) ANSI C plus Sun C compatibility extensions, with semantic changes required by ANSI C. Where Sun C and ANSI C specify different semantics for the same construct, the compiler will issue warnings about the conflict and use the ANSI C interpreta- tion. This is the default mode. c (conformance) Maximally conformant ANSI C, without Sun C compa- tibility extensions. The compiler will issue errors and warnings for programs that use non-ANSI C constructs. s (Sun C) The compiled language includes all features compa- tible with (pre-ANSI) Sun C. The compiler tries to warn about all language constructs that have differing behavior between Sun ANSI C and the old Sun C. Invokes cpp for processing. __SSTTDDCC__ is not defined in this mode. t (transition) ANSI C plus Sun C compatibility extensions, without semantic changes required by ANSI C. Where Sun C and ANSI C specify different semantics for the same construct, the compiler will issue warnings about the conflict and use the Sun C interpretation. The predefined macro __SSTTDDCC__ has the value 00 for --XXtt and --XXaa, and 11 for --XXcc. (It is not defined for -Xs.) All warning messages about differing behavior can be eliminated through appropriate coding; for example, use of casts can eliminate the integral promotion change warnings. -xa Same as -a. -xarch=a Limit the set of instructions the compiler may use. a must be one of: generic, v7, v8a, v8, v8plus, v8plusa. Although this option can be used alone, it is part of the expansion of the -xtarget option; its primary use is to override a value supplied by the -xtarget option. This option limits the instructions generated to those of the specified architecture, and allows the specified set of instructions. The option does not guarantee the specified set is used; however, under optimization, the set is usually used. If this option is used with optimization, the appropri- ate choice can provide good performance of the execut- able on the specified architecture. An inappropriate choice can result in serious degradation of perfor- mance. v7, v8, and v8a are all binary compatible. v8plus and v8plusa are binary compatible with each other and forward, but not backward. For any particular choice, the generated executable can run much more slowly on earlier architectures (to the left in the above list). See the C 4.0 User's Guide for details. The -xarch values are: generic Get good performance on most SPARCs, and major degradation on none. This is the default. v7 Limit the instruction set to V7 architecture. v8a Limit the instruction set to the V8a version of the V8 architecture. v8 Limit the instruction set to V8 architecture. v8plus Limit the instruction set to the V8plus version of the V9 architecture. v8plusa Limit the instruction set to the V8plusa version of the V9 architecture. -xautopar Turn on automatic parallelization for multiple proces- sors. Does dependence analysis (analyze loops for inter- iteration data dependence) and loop restructur- ing. If optimization is not at --xxOO33 or higher, optimi- zation is raised to --xxOO33 and a warning is emitted. -xcache=c Define the cache properties for use by the optimizer. c must be one of the following: o generic o s1/l1/a1 o s1/l1/a1:s2/l2/a2 o s1/l1/a1:s2/l2/a2:s3/l3/a3 The si/li/ai are defined as follows: si The size of the data cache at level i, in kilobytes li The line size of the data cache at level i, in bytes ai The associativity of the data cache at level i Although this option can be used alone, it is part of the expansion of the -xtarget option; its primary use is to override a value supplied by the -xtarget option. This option specifies the cache properties that the optimizer can use. It does not guarantee that any par- ticular cache property is used. The -xcache values are: generic Define the cache properties for good performance on most SPARCs. This is the default. s1/l1/a1 Define level 1 cache properties. s1/l1/a1:s2/l2/a2 Define levels 1 and 2 cache properties. s1/l1/a1:s2/l2/a2:s3/l3/a3 Define levels 1, 2, and 3 cache properties. -xCC Accept C++-style comments. -xcg89 Same as -cg89. -xcg92 Same as -cg92. -xchip=c Specify the target processor for use by the optimizer. c must be one of: generic, old, super, super2, micro, micro2, hyper, hyper2, powerup, ultra. Although this option can be used alone, it is part of the expansion of the -xtarget option; its primary use is to override a value supplied by the -xtarget option. This option specifies timing properties by specifying the target processor. Some effects are: o The ordering of instructions, that is, scheduling o The way the compiler uses branches o The instructions to use in cases where semantically equivalent alternatives are available The -xchip values are: generic Use timing properties for good performance on most SPARCs. old Use timing properties of pre-SuperSPARC proces- sors. super Use timing properties of the SuperSPARC chip. super2 Use timing properties of the SuperSPARC II chip. micro Use timing properties of the microSPARC chip. micro2 Use timing properties of the microSPARC II chip. hyper Use timing properties of the hyperSPARC chip. hyper2 Use timing properties of the hyperSPARC II chip. powerup Use timing properties of the Weitek PowerUp chip. ultra Use timing properties of the UltraSPARC chip. -xdepend Analyze loops for inter-iteration data dependencies and do loop restructuring. Dependence analysis is included in -xautopar. The dependency analysis is done at com- pile time. The -xdepend option is ignored unless either -xO3 or -xO4 is on, explicitly, or by another option. -xe Performs only syntax and semantic checking on the source files, but does not produce any object or exe- cutable code. -xexplicitpar Parallelize the loops that are specified. You do the dependency analysis: analyze and specify loops for inter-iteration and data dependencies. The software parallelizes the specified loops. If optimization is not at -xO3 or higher, then it is raised to -xO3. Avoid -xexplicitpar if you do your own thread management. The -xexplicitpar option requires the iMPact C mul- tiprocessor enhancement package. To get faster code, use this option on a multiprocessor system. On a single-processor system, the generated code usually runs slower. If you identify a loop for parallelization, and the loop has dependencies, you can get incorrect results, possibly different ones with each run, and with no warnings. Do not apply an explicit parallel pragma to a reduction loop. The explicit parallelization is done, but the reduction aspect of the loop is not done, and the results can be incorrect. If you use -xexplicitpar and compile and link in one step, then linking automatically includes the micro- tasking library and the threads-safe C runtime library. If you use -xexplicitpar and compile and link in separate steps, then you must also link with -xexpli- citpar. -xF Enables performance analysis of the executable using the Analyzer and Debugger. (See analyzer(1) and debugger(1) man pages.) Produces code that can be reordered at the function level. Each function in the file is placed in a separate section; for example, functions foo() and bar() will be placed in the sec- tions .text%foo and .text%bar , respectively. Function ordering in the executable can be controlled by using -xF in conjunction with the -M option to ld (see ld(1)). -xhelp=f Display on-line help information. -xhelp=flags displays a summary of the compiler options; -xhelp=readme displays the readme file; -xhelp=errors displays the Error and Warning Messages file. -xildoff Turn off the incremental linker and force the use of ld. This option is the default if you do not use the -g option, or you do use the -G option, or any source files are present on the command line. Override this default by using the -xildon option. -xildon Turn on the incremental linker and force the use of ild in incremental mode. This option is the default if you use the -g option, and you do not use the -G option, and there are no source files present on the command line. Override this default by using the -xildoff option. -xinline=[ff11,,......,,ffnn] Same as -inline. -xlibmieee Same as -libmieee. -xlibmil Same as -libmil. -xlic_lib_=l Link in the Sun supplied licensed libraries specified in l, where l is a comma-separated list of libraries. -xlicinfo Returns information about the licensing system. In particular, it returns the name of the license server and the userids of users who have licenses checked out. When you use this option, the compiler is not invoked and a license is not checked out. -xloopinfo Show which loops are parallelized and which are not. This option is normally for use with the -xautopar and -xexplicitpar options. It requires the iMPact C mul- tiprocessor enhancement package. -xM Generate makefile dependencies. -xM1 Generate makefile dependencies. -xMerge Directs acc to merge the data segment with the text segment for assembler. Data initialized in the object file produced by this compilation is read-only and (unless linked with ld-N) is shared between processes. -xnolib Same as -nolib. -xnolibmil Same as -nolibmil. -xO[1|2|3|4|5] Same as -O[1|2|3|4|5]. -xP Print prototypes for K&R C function definitions. -xparallel Parallelize both automatic and explicit loops. This option invokes -xautopar, -xdepend, and -xexplicitpar. There is a risk of producing incorrect results. Avoid -xparallel if you do your own thread management. This option requires the iMPact C multiprocessor enhancement package. To get faster code, use this option on a multiprocessor SPARC system. On a single- processor system, the generated code usually runs more slowly. The -xautopar option (and therefore the -xparallel option) includes dependency analysis; that is, if you try a -xautopar both with and without -xdepend, there is no noticeable difference. If you compile and link in one step, -xparallel links with the microtasking library and the threads-safe C runtime library. If you compile and link in separate steps, and you compile with -xparallel, then link with -xparallel. -xpg Same as -pg. -xprofile=p Collect data for a profile or use a profile to optim- ize. p must be collect, use[:name], or tcov. This option causes execution frequency data to be col- lected and saved during execution, then the data can be used in subsequent runs to improve performance. This option is only valid when a level of optimization is specified. collect Collect and save execution frequency for later use by the optimizer. use[:name] Use execution frequency data saved by the com- piler. The name is the name of the executable that is being analyzed. This name is optional. If name is not specified, a.out is assumed to be the name of the executable. tcov Correctly collects data for programs that have source code in header files or that make use of C++ templates. See also -xa. -xreduction Analyze loops for reduction in automatic paralleliza- tion. To enable parallelization of reduction loops, specify both -xreduction and -xautopar. If you specify -xreduction without -xautopar, the com- piler issues a warning. This option requires the iMPact C multiprocessor enhancement package. To get faster code, this option also requires a multiprocessor system. On a single- processor system, the generated code usually runs more slowly. There is always potential for roundoff error with reduction. If you have a reduction loop to be parallelized, then use -xreduction with -xautopar. Do not use an explicit pragma, because the explicit pragma prevents reduction for that loop, resulting in wrong answers. -xregs=r Specify the usage of registers for the generated code. r is a comma-separated list that consists of one or more of the following: [no%]appl, [no%]float. Example: -xregs=appl,no%float The -xregs= values are: appl Allow using the registers g2, g3, and g4. no%appl Do not use the appl registers. float Allow using the floating-point registers as specified in the SPARC ABI. no%float Do not use the floating-point registers. The default is: -regs=appl,float. -xrestrict=f Treat pointer-valued function parameters as restricted pointers. f is a comma-separated list that consists of one or more function parameters, %all, %none. This command-line option can be used on its own, but is best used with optimization of -xO3 or greater. The default is %%nnoonnee. Specifying -xrestrict is equivalent to specifying -xrestrict=%all. -xs Disable Auto-Read for dbx. Use this option in case you cannot keep the .o files around. It passes the -s option to the assembler. No Auto-Read is the older way of loading symbol tables. It places all symbol tables for dbx in the executable file. The linker links more slowly and dbx initializes more slowly. Auto-Read is the newer and default way of loading sym- bol tables. With Auto-Read, the information is distri- buted in the .o files, so that dbx loads the symbol table information only if and when it is needed. Hence, the linker links faster, and dbx initializes faster. With -xs, if you move the executables to another direc- tory, then to use dbx, you can ignore the object (.o) files. Without -xs, if you move the executables, you must move both the sources files and the object (.o) files, or set the path with the dbx pathmap or use command. -xsafe=mem Allow the compiler to assume no memory-based traps occur. This option grants permission to use the speculative load instruction on V9 machines. -xsb Same as -sb. -xsbfast Same as -sbfast. -xsfpconst Represent unsuffixed floating-point constants as single precision, instead of the default mode of double preci- sion. Not valid with -Xc. -xspace Do no optimizations that increase code size. Example: Do not unroll loops. -xstrconst Same as -strconst. -xtarget=t Specify the target system for the instruction set and optimization. t must be one of: native, generic, system-name. The -xtarget option permits a quick and easy specifica- tion of the -xarch, -xchip, and -xcache combinations that occur on real systems. The only meaning of -xtar- get is in its expansion. The -xtarget values are: native Get the best performance on the host system. generic Get the best performance for generic architec- ture, chip, and cache. This is the default. system-name Get the best performance for the specified system. Valid system names are: sun4/15, sun4/20, sun4/25, sun4/30, sun4/40, sun4/50, sun4/60, sun4/65, sun4/75, sun4/110, sun4/150, sun4/260, sun4/280, sun4/330, sun4/370, sun4/390, sun4/470, sun4/490, sun4/630, sun4/670, sun4/690, sselc, ssipc, ssipx, sslc, sslt, sslx, sslx2, ssslc, ss1, ss1plus, ss2, ss2p, ss4, ss5, ssvyger, ss10, ss10/hs11, ss10/hs12, ss10/hs14, ss10/20, ss10/hs21, ss10/hs22, ss10/30, ss10/40, ss10/41, ss10/50, ss10/51, ss10/61, ss10/71, ss10/402, ss10/412, ss10/512, ss10/514, ss10/612, ss10/712, ss20/hs11, ss20/hs12, ss20/hs14, ss20/hs21, ss20/hs22, ss20/51, ss20/61, ss20/71, ss20/502, ss20/512, ss20/514, ss20/612, ss20/712, ss600/41, ss600/51, ss600/61, ss600/120, ss600/140, ss600/412, ss600/512, ss600/514, ss600/612, ss1000, sc2000, cs6400, solb5, solb6, ultra, ultra2, ultra1/140, ultra1/170, ultra1/200, ultra2/1170, ultra2/1200, ultra2/1300, ultra2/2170, ultra2/2200, ultra2/2300, entr2, entr2/1170, entr2/2170, entr2/1200, entr2/2200, entr150, entr3000, entr4000, entr5000, entr6000. See the section on -xtarget=t in the C User's Guide for the -xtarget expansions that show the mnemonic encodings of the actual system names and numbers. This option is a macro. Each specific value for -xtarget expands into a specific set of values for the -xarch, -xchip, and -xcache options. For example: -xtarget=sun4/15 is equivalent to: -xarch=v8a -xchip=micro -xcache=2/16/1 -xtemp=dir Set directory for temporary files to dir. -xtime Same as -time. -xtransition Issue warnings for differences between K&R C and ANSI C. -xunroll=n Same as -unroll. -xvpara Issue warnings for loops that may not be safe to paral- lelize. As the compiler detects each explicitly paral- lelized loop that has dependencies, it issues a warning message but the loop is parallelized. Use with the -xexplicitpar option and the #pragma MP directive. This option requires the iMPact C multiprocessor enhancement package. -Y,dir Change default directories for finding libraries files. -Zll Create the lock_lint database files (.ll files), one per each .c file compiled for the lock_lint(1) program, which is included in the iMPact product. Do not actu- ally compile. -Zlp Prepare object files for the loop profiler, looptool. The looptool(1) utility can then be run to generate loop statistics about the program. Use this option with -xdepend; if -xdepend is not explicitly or implicitly specified, turns on -xdepend and issues a warning. If optimization is not at --OO33 or higher, optimization is raised to --OO33 and a warning is issued. The --ZZllpp option requires the iMPact C multiprocessor enhancement package. aacccc recognizes --rr, --uu, --YYPP,dir, and --zz, and passes these options and their arguments to lldd. aacccc also passes any unrecognized options to lldd with a warning. PRAGMAS The following #pragmas are recognized by the compilation system: #pragma align, #pragma fini, #prama init, #pragma ident, #pragma int_to_unsigned, #pragma MP serial_loop, #pragma MP serial_loop_nested, #pragma MP taskloop, #pragma nomemorydepend, #pragma no_side_effect, #pragma pack, #pragma pipeloop, #pragma redefine_extname, #pragma unknown_control_flow, #pragma unroll, #pragma weak. Notes on #pragma redefine_extname: This pragma causes every externally defined occurrence of the name "old_extname" in the object code to be "new_extname". Such that, at link time only the name "new_extname" is seen by the loader. If pragma redefine_extname is encountered after the first use of "old_extname", as a function definition, an initial- izer, or an expression, the effect is undefined. The compiler also predefines the object-like macro "_PRAGMA_REDEFINE_EXTNAME" to indicate the pragma will be recognized. Refer to the C User's Guide for more information on these pragmas. FILES a.out executable output file file.a library of object files file.c C source file file.d tcov(1) test coverage input file file.i C source file after prepro- cessing file.il inline expansion file file.o object file file.s assembler source file file.tcov output from tcov(1) acc compiler command line driver acomp compiler front end cg code generator crt1.o runtime startup code crti.o runtime startup code crtn.o runtime startup code fbe assembler gcrt1.o startup for profiling with gprof(1) gmon.out default profile file for --ppgg iropt global optimzer mcrt1.o start-up for profiling with prof(1) and intro(3) mon.out default profile file for --pp SunWS_cache The directory used to store sbrowser(1) data when the -xsb or -xsbfast flag is used. SEE ALSO ar(1), as(1), cflow(1), ctags(1), cxref(1), dbx(1), gprof(1), ld(1), lint(1), m4(1), make(1S), prof(1), tcov(1) C User's Guide B. W. Kernighan and D. M. Ritchie, The C Programming Language, Prentice-Hall, 1978 DIAGNOSTICS The diagnostics produced by the C compiler are intended to be self-explanatory. Occasional obscure messages may be produced by the preprocessor, assembler, or loader.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |