QLogic PathScale Compiler Suite; Copyright © 2006 QLogic Corporation. All rights reserved.
PGI Server Complete; Portions Copyright © 2006 STMicroelectronics, N.V., Portions Copyright © 2006 The Portland Group, Inc.
Selecting one of the following will take you directly to that section:
HEADER for OPTIMIZATION
Specify the basic level of optimization desired.
The options can be one of the following:
0 Turn off all optimizations.
1 Turn on local optimizations that can be done quickly.
2 Turn on extensive optimization.
This is the default.
The optimizations at this level are generally conservative,
in the sense that they are virtually always beneficial,
provide improvements commensurate to the compile time
spent to achieve them, and avoid changes which affect
such things as floating point accuracy.
3 Turn on aggressive optimization.
The optimizations at this level are distinguished from -O2
by their aggressiveness, generally seeking highest-quality
generated code even if it requires extensive compile time.
They may include optimizations that are generally beneficial
but may hurt performance.
This includes but is not limited to turning on the
Loop Nest Optimizer, -LNO:opt=1, and setting
-OPT:ro=1:IEEE_arith=2:Olimit=9000:reorg_common=ON.
s Specify that code size is to be given priority in tradeoffs with execution time.
If no value is specified, 2 is assumed.
Equivalent to -O3 -ipa -OPT:Ofast -fno-math-errno -ffast-math.
Use optimizations selected to maximize performance.
Although the optimizations are generally safe, they may affect
floating point accuracy due to rearrangement of computations.
NOTE: -Ofast enables -ipa (inter-procedural analysis), which places limitations on how libraries and .o files are built.
-fb_create <path>
Used to specify that an instrumented executable program is to be
generated. Such an executable is suitable for producing feedback
data files with the specified prefix for use in feedback-directed
optimization (FDO).
The commonly used prefix is "fbdata".
This is OFF by default.
During the training run, the instrumented executable produces information regarding execution paths and data values, but does not generate information by using hardware performance counters.
-fb_opt <prefix for feedback data files>
Used to specify feedback-directed optimization (FDO) by extracting
feedback data from files with the specified prefix, which were
previously generated using -fb-create.
The commonly used prefix is "fbdata".
The same optimization flags should be used
for both the -fb-create and fb_opt compile steps.
Feedback data files created from executables compiled
with different optimization flags may give checksum errors.
FDO is OFF by default.
During the -fb_opt compilation phase, information regarding execution paths and data values are used to improve the information available to the optimizer. FDO enables some optimizations which are only performed when the feedback data file is available. The safety of optimizations performed under FDO is consistent with the level of safety implied by the other optimization flags (outside of fb_create and fb_opt) specified on the compile and link lines.
Compile for 32-bit ABI, also known as x86 or IA32.
Compiler will optimize code for selected platform. auto means to optimize for the platform on which the compiler is running, as determined by reading /proc/cpuinfo. anyx86 means a generic 32-bit x86 processor without SSE2 support.
(For C++ only) -fexceptions enables exception handling. This is the default. -fno-exceptions disables exception handling.
-ffast-math improves FP speed by relaxing ANSI & IEEE rules. -fno-fast-math tells the compiler to conform to ANSI and IEEE math rules at the expense of speed. -ffast- math implies -OPT:IEEE_arithmetic=2 -fno-math-errno. -fno-fast-math implies -OPT:IEEE_arithmetic=1 -fmath-errno.
Do not set ERRNO after calling math functions that are executed with a single instruction, e.g. sqrt. A program that relies on IEEE exceptions for math error handling may want to use this flag for speed while maintaining IEEE arithmetic compatibility. This is implied by -Ofast. The default is -fmath-errno.
Invoke inter-procedural analysis (IPA). Specifying this option is identical to specifying -IPA or -IPA:. Default settings for the individual IPA suboptions are used.
The Code Generation option group -CG: controls the optimizations and transformations of the instruction-level code generator.
-CG:flow : OFF disables control flow optimization in the code generation. Default is ON.
-CG:gcm : Specifying OFF disables the instruction-level global code motion optimization phase. The default is ON.
-CG:load_exe=N : Specify the threshold for subsuming a memory load
operation into the operand of an arithmetic instruction.
The value of 0 turns off this subsumption optimization.
If N is 1, this subsumption is performed only when the result of
the load has only one use.
This subsumption is not performed if the number of times the result
of the load is used exceeds the value N, a non-negative integer.
If the ABI is 64-bit and the language is Fortran, the default for N
is 2, otherwise the default is 1.
-CG:local_fwd_sched : Change the instruction scheduling algorithm to work forward instead of backward for the instructions in each basic block. The default is OFF for 64-bit ABI, and ON for 32-bit ABI.
-CG:movnti=N : Convert ordinary stores to non-temporal stores when writing memory blocks of size larger than N KB. When N is set to 0, this transformation is avoided. The default value is 120 (KB).
-CG:prefetch : Suppress any generation of prefetch instructions in the code generator. The default is ON.
The inter-procedural analyzer option group -IPA: controls application of inter-procedural analysis and optimization.
-IPA:callee_limit=N : Functions whose size exceeds this limit will never be automatically inlined by the compiler. The default is 500.
-IPA:linear : Controls conversion of a multi-dimensional array to a single dimensional (linear) array that covers the same block of memory. When inlining Fortran subroutines, IPA tries to map formal array parameters to the shape of the actual parameter. In the case that it cannot map the parameter, it linearizes the array reference. By default, IPA will not inline such callsites because they may cause performance problems. The default is OFF.
-IPA:plimit=N : This option stops inlining into a specific subprogram once it reaches size N in the intermediate representation. Default is 2500.
-IPA:pu_reorder=N : Control re-ordering the layout of program units based on their invocation patterns in feedback compilation to minimize instruction cache misses. This option is ignored unless under feedback compilation.
0 Disable procedure reordering. This is the default for non-C++ programs.
1 Reorder based on the frequency in which different procedures are invoked. This is the default for C++ programs.
2 Reorder based on caller-callee relationship.
-IPA:space=N : Inline until a program expansion of N % is reached. For example, -IPA:space=20 limits code expansion due to inlining to approximately 20 %. Default is no limit.
Specify options and transformations performed on loop nests by the Loop Nest Optimizer (LNO). The -LNO options are enabled only if -O3 is also specified on the pathf95 command line.
-LNO:blocking : Enable or disable the cache blocking transformation. The default is ON.
-LNO:full_unroll,fu=N : Fully unroll loops with trip_count <= N inside LNO. N can be any integer between 0 and 100. The default value for N is 5. Setting this flag to 0 disables full unrolling of small trip count loops inside LNO.
-LNO:full_unroll_outer=(on|off|0|1) : Control the full unrolling of loops with known trip count that do not contain a loop and are not contained in a loop. The conditions implied by both the full_unroll and the full_unroll_size options must be satisfied for the loop to be fully unrolled. The default is OFF.
-LNO:full_unroll_size=N : Fully unroll loops with unrolled loop size <= N inside LNO. N can be any integer between 0 and 10000. The conditions implied by the full_unroll option must also be satisfied for the loop to be fully unrolled. The default value for N is 2000.
-LNO:fusion=N : Perform loop fusion. N can be one of the following:
0 = Loop fusion is off
1 = Perform conservative loop fusion
2 = Perform aggressive loop fusion
The default is 1.
-LNO:ignore_feedback=(on|off|0|1) : If the flag is ON then feedback information from the loop annotations will be ignored in LNO transformations. The default is OFF.
-LNO:interchange=(on|off|0|1) : Disable the loop interchange transformation in the loop nest optimizer. Default is ON.
Enable or disable moving loop-invariant expressions out of loops. The default is ON.
-LNO:ou_prod_max=N : This option indicates that the product of unrolling of the various outer loops in a given loop nest is not to exceed N, where N is a positive integer. The default is 16.
-LNO:prefetch_ahead=N : Prefetch N cache line(s) ahead. The default is 2.
-LNO:prefetch=(0|1|2|3) : This option specifies the level of prefetching.
0 = Prefetch disabled.
1 = Prefetch is done only for arrays that are always referenced in each iteration of a loop.
2 = Prefetch is done without the above restriction. This is the default.
3 = Most aggressive.
Turn ON or OFF the optimization that replaces an array by a scalar variable. The default is ON.
-LNO:simd=(0|1|2) : This option enables or disables inner loop vectorization.
0 = Turn off the vectorizer.
1 = (Default) Vectorize only if the compiler can determine that there is no undesirable performance impact due to sub-optimal alignment. Vectorize only if vectorization does not introduce accuracy problems with floating-point operations.
2 = Vectorize without any constraints (most aggressive).
The -OPT: option group controls miscellaneous optimizations. These options override defaults based on the main optimization level.
-OPT:alias=<name>
Specify the pointer aliasing model
to be used. By specifying one or more of the following for <name>,
the compiler is able to make assumptions throughout the compilation:
typed
Assume that the code adheres to the ANSI/ISO C standard
which states that two pointers of different types cannot point
to the same location in memory.
This is ON by default when -OPT:Ofast is specified.
restrict
Specify that distinct pointers are assumed to point to distinct,
non-overlapping objects. This is OFF by default.
disjoint
Specify that any two pointer expressions are assumed to point
to distinct, non-overlapping objects. This is OFF by default.
-OPT:div_split=(ON|OFF)
Enable or disable changing x/y into x*(recip(y)). This is OFF by
default, but enabled by -OPT:Ofast or -OPT:IEEE_arithmetic=3.
This transformation generates fairly accurate code.
-OPT:fast_complex
Setting fast_complex=ON enables fast
calculations for values declared to be of the type complex.
When this is set to ON, complex absolute value (norm) and complex
division use fast algorithms that overflow for an operand
(the divisor, in the case of division) that has an absolute value
that is larger than the square root of the largest representable
floating-point number.
This would also apply to an underflow for a value that is smaller
than the square root of the smallest representable floating point
number.
OFF is the default.
fast_complex=ON is enabled if -OPT:roundoff=3 is in effect.
-OPT:IEEE_arithmetic,IEEE_arith,IEEE_a=(1|2|3)
Specify the level of conformance to IEEE 754 floating pointing
roundoff/overflow behavior.
The options can be one of the following:
1 Adhere to IEEE accuracy. This is the default when optimization levels -O0, -O1 and -O2 are in effect.
2 May produce inexact result not conforming to IEEE 754. This is the default when -O3 is in effect.
3 All mathematically valid transformations are allowed.
-OPT:Ofast
Use optimizations selected to maximize performance.
Although the optimizations are generally safe, they may affect
floating point accuracy due to rearrangement of computations.
This effectively turns on the following optimizations:
-OPT:ro=2:Olimit=0:div_split=ON:alias=typed.
-OPT:Olimit=N
Disable optimization when size of program unit is > N. When N is 0,
program unit size is ignored and optimization process will not be
disabled due to compile time limit.
The default is 0 when -OPT:Ofast is specified,
9000 when -O3 is specified; otherwise the default is 6000.
-OPT:roundoff,ro=(0|1|2|3)
Specify the level of acceptable departure from source language
floating-point, round-off, and overflow semantics.
The options can be one of the following:
0 = Inhibit optimizations that might affect the floating-point behavior. This is the default when optimization levels -O0, -O1, and -O2 are in effect.
1 = Allow simple transformations that might cause limited round-off or overflow differences. Compounding such transformations could have more extensive effects. This is the default when -O3 is in effect.
2 = Allow more extensive transformations, such as the reordering of reduction loops. This is the default level when -OPT:Ofast is specified.
3 = Enable any mathematically valid transformation.
-OPT:rsqrt=(0|1|2)
This option specifies if the RSQRT machine instruction should be used
to calculate reciprocal square root. RSQRT is faster but potentially
less accurate than the regular square root operation.
0 means not to use RSQRT.
1 means to use RSQRT followed by instructions to refine the result.
2 means to use RSQRT by itself.
Default is 1 when -OPT:roundoff=2 or greater, else the default is 0.
-OPT:unroll_size=N
Set the ceiling of maximum number of instructions for an
unrolled inner loop. If N=0, the ceiling is disregarded.
The default is 40.
-OPT:unroll_times_max=N
Unroll inner loops by a maximum of N. The default is 4.
The -WOPT: Specifies options that affect the global optimizer. The options are enabled at -O2 or above.
-WOPT:aggstr=N
This controls the aggressiveness of the strength reduction optimization
performed by the scalar optimizer, in which induction expressions
within a loop are replaced by temporaries that are incremented
together with the loop variable. When strength reduction is overdone,
the additional temporaries increase register pressure, resulting in
excessive register spills that decrease performance.
The value specified must be a positive integer value, which specifies
the maximum number of induction expressions that will be strength-reduced
across an index variable increment.
When set at 0, strength reduction is only performed for non-trivial
induction expressions. The default is 11.
-WOPT:mem_opnds=(ON|OFF)
Makes the scalar optimizer preserve any memory operands of arithmetic
operations so as to help bring about subsumption of memory loads into
the operands of arithmetic operations. Load subsumption is the combining
of an arithmetic instruction and a memory load into one instruction.
Default is OFF.
-WOPT:retype_expr=(ON|OFF)
Enables the optimization in the compiler that converts 64-bit address
computation to use 32-bit arithmetic as much as possible.
Default is OFF.
Use C99 language features.
Chooses generally optimal flags for a processor that supports SSE capabillity.
Disable C++ exception handling support.
Disable C++ run time type information support.
Align "unconstrained" data objects of size greater than or equal to 16 bytes on cache-line boundaries. An "unconstrained" object is a variable or array that is not a member of an aggregate structure or common block, is not allocatable, and is not an automatic array. On by default on 64-bit Linux systems.
Set SSE to flush-to-zero mode; if a floating-point underflow occurs, the value is set to zero.
Generate code to set up a stack frame.
Eliminates operations that set up a true stack frame pointer for every function. With this option enabled, you cannot perform a traceback on the generated code and you cannot access local variables.
Instructs the compiler to use relaxed precision in the calculation of some intrinsic functions. Can result in improved performance at the expense of numerical accuracy.
Set the fetch-ahead distance for prefetch instructions to m cache lines
Set maximum number of prefetch instructions to generate for a given loop to p.
Use the prefetchnta instruction.
Use the prefetch instruction.
Use the prefetcht0 instruction.
Use the AMD-specific prefetchw instruction.
Enable generation of prefetch instructions on processors where they are supported.
Disable generation of prefetch instructions.
Use SSE/SSE2 instructions to perform scalar floating-point arithmetic on targets where these instructions are supported.
Do not use SSE/SSE2 instructions to perform scalar floating-point arithmetic; use x87 operations instead.
Instructs the compiler to extend the sign bit that is set as a result of an object's conversion from one data type to an object of a larger signed data type.
Treat individual array element references as candidates for possible loop-carried redundancy elimination. The default is to eliminate only redundant expressions involving two or more operands.
Allow expression re-association; specifying this sub-option can increase opportunities for loop-carried redundancy elimination.
Disable expression re-association.
Enables loop-carried redundancy elimination, an optimization that can reduce the number of arithmetic operations and memory references in loops.
Disable loop-carried redundancy elimination.
Instructs the compiler not to perform idiom recognition or introduce calls to hand-optimized vector functions.
Generate profile-feedback instrumentation (PFI); this includes extra code to collect run-time statistics and dump them to a trace file for use in a subsequent compilation. PFI gathers information about a program's execution and data values but does not gather information from hardware performance counters. PFI does gather data for optimizations which are unique to profile-feedback optimization.
Enable profile-feedback optimizations.
Interprocedural Analysis option: Recognize when targets of pointer dummy are aligned.
Interprocedural Analysis option: Disable recognizition when targets of pointer dummy are aligned.
Interprocedural Analysis option: Remove arguments replaced by -Mipa=ptr,const
Interprocedural Analysis option: Do not remove arguments replaced by -Mipa=ptr,const
Interprocedural Analysis option: Generate call graph information for pgicg tool.
Interprocedural Analysis option: Do not generate call graph information for pgicg tool.
Interprocedural Analysis option: Enable interprocedural constant propagation.
Interprocedural Analysis option: Disable interprocedural constant propagation.
Interprocedural Analysis option: Used with -Mipa=inline to specify functions which should not be inlined.
Equivalant to -Mipa=align,arg,const,f90ptr,shape,globals,localarg,ptr.
Interprocedural Analysis option: Force all objects to recompile regardless whether IPA information has changed.
Interprocedural Analysis option: Optimize references to global values.
Interprocedural Analysis option: Do not optimize references to global values.
Interprocedural Analysis option: Automatically determine which functions to inline, limit to n levels. IPA-based function inlining is performed from leaf routines upward.
Interprocedural Analysis option: Automatically determine which functions to inline. IPA-based function inlining is performed from leaf routines upward.
Interprocedural Analysis option: Allow inlining of routines from libraries.
Interprocedural Analysis option: Do not inline routines from libraries.
Interprocedural Analysis option: Allow recompiling and optimization of routines from libraries using IPA information.
Interprocedural Analysis option: Don't optimize routines in libraries.
Interprocedural Analysis option: -Mipa=arg plus externalizes local pointer targets.
Interprocedural Analysis option: -Mipa=arg plus externalizes local pointer targets.
Interprocedural Analysis option: Do not externalize local pointer targets.
Interprocedural Analysis option: Enable pointer disambiguation across procedure calls.
Interprocedural Analysis option: Disable pointer disambiguation.
Interprocedural Analysis option: Fortran 90/95 Pointer disambiguation across calls.
Interprocedural Analysis option: Disable Fortran 90/95 pointer disambiguation
Interprocedural Analysis option: Pure function detection.
Interprocedural Analysis option: Disable pure function detection.
Interprocedural Analysis option: Perform Fortran 90 array shape propagation.
Interprocedural Analysis option: Disable Fortran 90 array shape propagation.
Interprocedural Analysis option: Remove functions that are never called.
Interprocedural Analysis option: Do not remove functions that are never called.
Enable Interprocedural Analysis.
Instructs the parallelizer to generate alternate serial code for parallelized loops. Without arguments, the parallelizer determines an appropriate cutoff length and generates serial code to be executed whenever the loop count is less than or equal to that length.
Instructs the parallelizer to generate alternate serial code for parallelized loops. With arguments, the serial altcode is executed whenever the loop count is less than or equal to n.
Always execute the parallelized version of a loop regardless of the loop count.
Disables parallelization of loops with reductions.
Assume loops containing calls are safe to parallelize and allows loops containing calls to be candidates for parallelization. Also, no minimum loop count threshold must be satisfied before parallelization will occur, and last values of scalars are assumed to be safe.
Do not assume loops containing calls are safe to parallelize.
Parallelize with block distribution. Contiguous blocks of iterations of a parallelizable loop are assigned to the available processors.
Parallelize with cyclic distribution. The outermost parallelizable loop in any loop nest is parallelized. If a parallelized loop is innermost, its iterations are allocated to processors cyclically. For example, if there are 3 processors executing a loop, processor 0 performs iterations 0, 3, 6, etc.; processor 1 performs iterations 1, 4, 7, etc.; and processor 2 performs iterations 2, 5, 8, etc.
Enable parallelization of innermost loops.
Disable parallelization of innermost loops.
Instructs the compiler to enable auto-concurrentization of loops. If -Mconcur is specified, multiple processors will be used to execute loops that the compiler determines to be parallelizable.
Instructs the inliner to inline the functions within the library filename.ext.
Instructs the inliner to inline all eligible functions except func, a function in the source text. Multiple functions can be listed, comma-separated.
Instructs the inliner to inline function func.
Instructs the inliner to inline functions with n or fewer statements.
Instructs the inliner to perform n levels of inlining.
Instructs the inliner to perform 1 level of inlining.
Assume all pointers and arrays are independent and safe for aggressive optimizations, and in particular that no pointers or arrays overlap of conflict with each other.
Instructs the compiler that arrays and pointers are treated with the same copyin and copyout semantics as Fortran dummy arguments.
Instructs the compiler that local pointers and arrays do not overlap or conflict with each other and are independent.
Instructs the compiler that local pointers and arrays do not overlap or conflict with each other and are independent.
Instructs the compiler that static pointers and arrays do not overlap or conflict with each other and are independent.
Instructs the compiler that global or external pointers and arrays do not overlap or conflict with each other and are independent.
Instructs the C/C++ compiler to override data dependencies between pointers of a given storage class.
Instructs the compiler to completely unroll loops with a constant loop count of less than or equal to m.
Instructs the compiler to unroll u times, a loop that is not completely unrolled, or has a non-constant loop count.
Invokes the loop unroller.
Disable loop unrolling.
Enable an optional post-pass instruction scheduling.
Disable an optional post-pass instruction scheduling.
Disable automatic vector pipelining.
Instructs the vectorizer to generate alternate code for vectorized loops when appropriate. For each vectorized loop the compiler decides whether to generate altcode and what type or types to generate, which may be any or all of: altcode without iteration peeling, altcode with non-temporal stores and other data cache optimizations, and altcode base on array alignments calculated dynamically at runtime. The compiler also determines suitable loop count and array alignment conditions for executing the altcode.
Disables alternate code generation for vectorized loops.
Instructs the vectorizer to enable certain associativity conversions that can change the results of a computations due to roundoff error. A typical optimization is to change an arithmetic operation to an arithmetic opteration that is mathmatically correct, but can be computationally different, due to round-off error.
Instructs the vectorizer to disable associativity conversions.
Instructs the vectorizer, when performing cache tiling optimizations, to assume a cache size of n. The default size is n=262144.
Instructs the vectorizer to enable loop fusion.
Instructs the vectorizer to enable idiom recognition.
Generate vector loops for all loops where possible regardless of the number of statements in the loop. This overrides a heuristic in the vectorizer that ordinarily prevents vectorization of loops with a number of statements that exceed a certain threshold.
Instructs the vectorizer to generate prefetch instructions.
Instructs the vectorizer to search for vectorizable loops and, where possible, make use of SSE, SSE2, and prefetch instructions.
Enable automatic vector pipelining.
A basic block is generated for each C statement. No scheduling is done between statements. No global optimizations are performed.
Scheduling within extended basic blocks is performed. Some register allocation is performed. No global optimizations are performed.
Specify the type of the target processor as AMD64 Processor 32-bit mode.
Specify the type of the target processor as AMD64 Processor 64-bit mode.
Specify the type of the target processor as Intel P7 Architecture (Pentium 4, Xeon, Centrino).
Specify the type of the target processor as Intel P7 Architecture with EM64t, 64-bit mode.
Use the unified AMD/Intel 64-bit mode.
HEADER for PORTABILITY
CFP2006:
If -funderscoring is in effect, and the original Fortran external identifier contained an underscore, -fsecond-underscore appends a second underscore to the one added by -funderscoring. -fno-second-underscore does not append a second underscore. The default is both -funderscoring and -fsecond-underscore, the same defaults as g77 uses. -fno-second-underscore correcponds to the default policies of PGI Fortran and Intel Fortran.
Don't include Fortran main program object module.
HEADER for COMPILER
Invoke the PathScale C compiler.
Also used to invoke linker for C programs.
Invoke the PathScale C++ compiler.
Also used to invoke linker for C++ programs.
Invoke the PathScale Fortran 77, 90 and 95 compilers.
Also used to invoke linker for Fortran programs and
for mixed C / Fortran. pathf90 and pathf95 are synonymous.
The PGI C compiler.
The PGI C++ compiler.
The PGI Fortran 90/95 compiler.