pgi2013_linux_flags
PGI Server Complete for Linux, Release 2013. Optimization, Compiler, and Other flags for use by SPEC CPU2006
Compilers: PGI Server Complete 2013
Operating systems: Linux
]]>
The PGI C compiler for Windows.
]]>
pgcc.exe
The PGI C++ compiler for Windows.
]]>
pgcpp.exe
The PGI Fortran 90 compiler for Windows.
]]>
pgf90.exe
The PGI Fortran 95 compiler for Windows.
]]>
pgf95.exe
The PGI Fortran compiler for Windows.
]]>
pgfortran.exe
The PGI C compiler for Linux.
]]>
pgcc
The PGI C++ compiler for Linux.
]]>
pgcpp
The PGI Fortran 95 compiler for Linux.
]]>
pgf95
The PGI Fortran 90 compiler for Linux.
]]>
pgf90
The PGI Fortran compiler for Linux.
]]>
pgfortran
Disable warning messages.
]]>
-w
Don't include Fortran main program object module.
]]>
-Mnomain
Use C99 language features.
]]>
-c9x
Chooses generally optimal flags for the target platform. As of the PGI 7.0 release, the flags "-fast"
and "-fastsse" are equivlent for 64-bit compilations. For 32-bit compilations "-fast" does not include
"-Mscalarsse", "-Mcache_align", or "-Mvect=sse".
]]>
-fast
Disable C++ exception handling support.
]]>
--no_exceptions
Disable C++ run time type information support.
]]>
--no_rtti
Generate zero-overhead C++ exception handlers.
]]>
Specify the type of the target processor as 64-bit mode.
]]>
-m64
Specify the type of the target processor as 32-bit mode.
]]>
-m32
Inline functions declared with the inline keyword.
]]>
-Mautoinline
Disable inlining of functions declared with the inline keyword. <Default>
]]>
-Mnoautoinline
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.
]]>
-Mcache_align
Align doubles on double alignment boundaries
]]>
-Mdalign
Do not align doubles on double alignment boundaries. <Default>
]]>
-Mnodalign
Set SSE to flush-to-zero mode; if a floating-point underflow occurs, the value is set to zero.
]]>
-Mflushz
Treat denormalized numbers as zero. Included with "-fast" on Intel based systems. For AMD based systems, "-Mdaz" is
not included by default with "-fast".
]]>
-Mdaz
Generate code to set up a stack frame. <Default>
]]>
-Mframe
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.
]]>
-Mnoframe
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Instructs the compiler to use relaxed precision in the calculation of floating-point reciprocal square root (1/sqrt). Can result in
improved performance at the expense of numerical accuracy.
]]>
-Mfprelaxed=rsqrt
Instructs the compiler to use relaxed precision in the calculation of floating-point square root. Can result in
improved performance at the expense of numerical accuracy.
]]>
-Mfprelaxed=sqrt
Instructs the compiler to use relaxed precision in the calculation of floating-point division. Can result in improved performance at the expense of numerical accuracy.
]]>
-Mfprelaxed=div
Instructs the compiler to allow floating-point expression reordering, including factoring. Can result in
improved performance at the expense of numerical accuracy.
]]>
-Mfprelaxed=order
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. The default on an AMD system is "-Mfprelaxed=sqrt,rsqrt,order". The
default on an Intel system is "-Mfprelaxed=rsqrt,sqrt,div,order"
]]>
-Mfprelaxed
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Instructs the compiler to use low-precision approximation in the calculation of reciprocal square root (1/sqrt). Can result in
improved performance at the expense of numerical accuracy.
]]>
-Mfpapprox=rsqrt
Instructs the compiler to use low-precision approximation in the calculation of square root. Can result in
improved performance at the expense of numerical accuracy.
]]>
-Mfpapprox=sqrt
Instructs the compiler to use low-precision approximation in the calculation of divides. Can result in
improved performance at the expense of numerical accuracy.
]]>
-Mfpapprox=div
Instructs the compiler to perform low-precision approximation in the calculation of floating-point division, square-root, and reciprocal square root.
Can result in improved performance at the expense of numerical accuracy.
]]>
-Mfpapprox
-Mpre
-Mpre
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Set the fetch-ahead distance for prefetch instructions to $1 cache lines
]]>
-Mprefetch=d:m
N
Set maximum number of prefetch instructions to generate for a given loop to $1.
]]>
-Mprefetch=n:p
N
Use the prefetchnta instruction.
]]>
-Mprefetch_nta
Use the prefetch instruction.
]]>
-Mprefetch=plain
Use the prefetcht0 instruction.
]]>
-Mprefetch=t0
Use the AMD-specific prefetchw instruction.
]]>
-Mprefetch=w
Enable generation of prefetch instructions on processors where they are supported.
]]>
-Mprefetch
Disable generation of prefetch instructions. <Default>
]]>
-Mnoprefetch
Use SSE/SSE2 instructions to perform scalar floating-point arithmetic on targets where these
instructions are supported. This option is default on SSE2 enabled target architectures.
]]>
-Mscalarsse
Do not use SSE/SSE2 instructions to perform scalar floating-point arithmetic; use x87 operations instead.
]]>
-Mnoscalarsse
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.
]]>
-Msignextend
Aligns or does not align innermost loops on 32 byte boundaries with -tp barcelona.
Small loops on barcelona systems may run fast if aligned on 32-byte boundaries; however, in practice, most
assemblers do not yet implement efficient padding causing some programs to run more slowly with this as
default. Use -Mloop32 on systems with an assembler tuned for barcleona. The default is -Mnoloop32.
]]>
-Mloop32
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.
]]>
-Mlre_array
Allow expression re-association; specifying this sub-option can increase opportunities for loop-carried
redundancy elimination.
]]>
-Mlre=assoc
Disable expression re-association.
]]>
-Mlre=noassoc
Enables loop-carried redundancy elimination, an optimization that can reduce the number of arithmetic operations
and memory references in loops.
]]>
-Mlre
Disable loop-carried redundancy elimination. <Default>
]]>
-Mnolre
Instructs the compiler not to perform idiom recognition or introduce calls to hand-optimized vector functions.
]]>
-Mnovintr
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.
The indirect sub-option enables collection of indirect function call targets, which can be used for indirect function call inlining.
]]>
-Mpfi=indirect
Enable profile-feedback optimizations including indirect function call inlining. This option requires a pgfi.out file generated from a binary built with -Mpfi=indirect.
]]>
-Mpfo=indirect
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.
]]>
-Mpfi
Enable profile-feedback optimizations.
]]>
-Mpfo
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Interprocedural Analysis option: Recognize when targets of pointer dummy are aligned.
]]>
-Mipa=align
Interprocedural Analysis option: Disable recognizition when targets of pointer dummy are aligned.
]]>
-Mipa=noalign
Interprocedural Analysis option: Remove arguments replaced by -Mipa=ptr,const
]]>
-Mipa=arg
Interprocedural Analysis option: Do not remove arguments replaced by -Mipa=ptr,const
]]>
-Mipa=noarg
Interprocedural Analysis option: Generate call graph information for pgicg tool.
]]>
-Mipa=cg
Interprocedural Analysis option: Do not generate call graph information for pgicg
tool.
]]>
-Mipa=nocg
Interprocedural Analysis option: Enable interprocedural constant propagation.
]]>
-Mipa=const
Interprocedural Analysis option: Disable interprocedural constant propagation.
]]>
-Mipa=noconst
Interprocedural Analysis option: Used with -Mipa=inline to specify functions which should not be inlined.
]]>
-Mipa=except:func
Instructs the compiler to perform interprocedural analysis. Equivalant to -Mipa=align,arg,const,f90ptr,shape,globals,libc,localarg,ptr,pure.
]]>
-Mipa=fast
Interprocedural Analysis option: Force all objects to recompile regardless
whether IPA information has changed.
]]>
-Mipa=force
Interprocedural Analysis option: Optimize references to global values.
]]>
-Mipa=globals
Interprocedural Analysis option: Do not optimize references to global values.
]]>
-Mipa=noglobals
Interprocedural Analysis option: Automatically determine which functions
to inline, limit to $1 levels where $1 is a supplied constant value. If no value is suppiled, then the default value of 2 is used. IPA-based function inlining is performed from leaf routines upward.
]]>
N
-Mipa=inline:4
Interprocedural Analysis option: Automatically determine which functions to inline, limit to 2 levels (default).
IPA-based function inlining is performed from leaf routines upward.
]]>
-Mipa=inline
Interprocedural Analysis option: Automatically determine which functions
to inline, independent of information gathered from profile guided feedback (-Mpfi), limit to $1 levels where $1 is a supplied constant value. If no value is suppiled, then the default value of 2 is used. IPA-based function inlining is performed from leaf routines upward.
]]>
N
-Mipa=inlinenopfo:4
Interprocedural Analysis option: Automatically determine which functions to inline, independent of information gathered from profile guided feedback (-Mpfi), limit to 2 levels (default).
IPA-based function inlining is performed from leaf routines upward.
]]>
-Mipa=inlinenopfo
Interprocedural Analysis option: Inline static functions which are outside the scope of the current file.
]]>
-Mipa=staticfunc
Interprocedural Analysis option: Allow inlining of routines from libraries.
]]>
-Mipa=libinline
Interprocedural Analysis option: Do not inline routines from libraries.
]]>
-Mipa=nolibinline
Interprocedural Analysis option: Specifies the number of concurent IPA second pass compliation proccess that may be performed. This option speeds-up the compilation time on multi-core systems but does not perform any optimizations.
]]>
-Mipa=libc
Interprocedural Analysis option: Used to optimize calls to certain functions from the system's standard C library, libc.
]]>
-Mipa=libc
Interprocedural Analysis option: Allow recompiling and optimization of routines from libraries using IPA information.
]]>
-Mipa=libopt
Interprocedural Analysis option: Don't optimize routines in libraries.
]]>
-Mipa=nolibopt
Interprocedural Analysis option: -Mipa=arg plus externalizes local pointer targets.
]]>
-Mipa=localarg
Interprocedural Analysis option: -Mipa=arg plus externalizes local pointer targets.
]]>
-Mipa=localarg
Interprocedural Analysis option: Do not externalize local pointer targets.
]]>
-Mipa=nolocalarg
Interprocedural Analysis option: Enable pointer disambiguation across procedure calls.
]]>
-Mipa=ptr
Interprocedural Analysis option: Disable pointer disambiguation.
]]>
-Mipa=noptr
Interprocedural Analysis option: Fortran 90/95 Pointer disambiguation across calls.
]]>
-Mipa=f90ptr
Interprocedural Analysis option: Disable Fortran 90/95 pointer disambiguation
]]>
-Mipa=nof90ptr
Interprocedural Analysis option: Pure function detection.
]]>
-Mipa=pure
Interprocedural Analysis option: Disable pure function detection.
]]>
-Mipa=nopure
Interprocedural Analysis option: Allows inlining in Fortran even when array shapes do not match.
]]>
-Mipa=reshape
Interprocedural Analysis option: Perform Fortran 90 array shape propagation.
]]>
-Mipa=shape
Interprocedural Analysis option: Disable Fortran 90 array shape propagation.
]]>
-Mipa=noshape
Interprocedural Analysis option: Remove functions that are never called.
]]>
-Mipa=vestigial
Interprocedural Analysis option: Do not remove functions that are never called.
]]>
-Mipa=novestigial
Enable Interprocedural Analysis.
]]>
-Mipa
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Instructs the PGI runtime libraries to create a number of threads
equal to the number of cores on the system during parallel execution.
Note that the settings of the environment variables OMP_NUM_THREADS or NCPUS will take precedence.
]]>
-Mconcur=allcores
Instructs the PGI runtime libraries to automatically bind threads to the executing system's cores.
]]>
-Mconcur=bind
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.
]]>
-Mconcur=altcode
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 $1.
]]>
-Mconcur=altcode:n
N
Always execute the parallelized version of a loop regardless of the loop count.
]]>
-Mconcur=noaltcode
Disables parallelization of loops with reductions.
]]>
-Mconcur=noassoc
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.
]]>
-Mconcur=cncall
Do not assume loops containing calls are safe to parallelize.
]]>
-Mconcur=nocncall
Parallelize with block distribution. Contiguous blocks of iterations of a parallelizable loop
are assigned to the available processors.
]]>
-Mconcur=dist:bloc
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.
]]>
-Mconcur=dist:cyclic
Enable parallelization of innermost loops.
]]>
-Mconcur=innermost
Disable parallelization of innermost loops.
]]>
-Mconcur=noinnermost
Parallelize loops nested at most $1 levels deep
]]>
-Mconcur=innermost:5
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.
]]>
-Mconcur
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Instructs the inliner to inline the functions within the library filename.ext.
]]>
-Minline=lib:filename.ext
Instructs the inliner to inline all eligible functions except $1, a function in the source text.
Multiple functions can be listed, comma-separated.
]]>
-Minline=except:func
foo
Instructs the inliner to inline function func.
]]>
-Minline=name:func
Allows inlining in Fortran even when array shapes do not match.
]]>
-Minline=reshape
Instructs the inliner to inline functions with $1 or fewer statements where $1 is a supplied constant value.
]]>
N
-Minline=size:n
Instructs the inliner to perform $1 levels of inlining where $1 is a supplied constant value. If no value is suppiled, then the default value of 2 is used.
]]>
N
-Minline=levels:4
Instructs the inliner to perform 1 level of inlining.
]]>
-Minline
Disable constant propagation from assertions derived from equality conditionals.
]]>
-Mnopropcond
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Link with the huge page runtime library and allocate a maximum of $1 huge pages where $1 is a supplied constant value.
If no constant value is supplied, then the maximum number of huge pages the application can use is limited by the number of huge pages the operating system has available or the value of the environment variable PGI_HUGE_PAGES. Note that setting PGI_HUGE_PAGES will override the value of $1.
]]>
N
-Msmartalloc=huge:150
Link with the huge page runtime library. The maximum number of huge pages the application can use is limited by the number of huge pages the operating system has available or the value of the environment variable PGI_HUGE_PAGES.
]]>
-Msmartalloc=huge
Link with the huge page runtime library. Use huge pages for an executable's .BSS section.
]]>
-Msmartalloc=hugebss
Adds a call to the routine "mallopt" in the main routine. This option can have a dramatic impact on the performance of programs that dynamically allocate memory, especially for those which have a few large mallocs. To be effective, this switch must be specified when compiling the file containing the Fortran, C, or C++ main routine.
]]>
-Msmartalloc
Link with PGI's Alloc library which replaces the system's Malloc, Calloc, Realloc, and Free functions with PGI versions. Programs using -Msmartalloc must be compiled and linked with "-Bdynamic".
]]>
-Msmartalloc
Disable support for large (> 2GB) addresses on 64-bit Windows.
]]>
-Mlargeaddressaware=no
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
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.
]]>
-Msafeptr=all
Instructs the compiler that arrays and pointers are treated with the same copyin and copyout
semantics as Fortran dummy arguments.
]]>
-Msafeptr=arg
Instructs the compiler that local pointers and arrays do not overlap or
conflict with each other and are independent.
]]>
-Msafeptr=auto
Instructs the compiler that local pointers and arrays do not overlap or
conflict with each other and are independent.
]]>
-Msafeptr=local
Instructs the compiler that static pointers and arrays do not overlap or conflict
with each other and are independent.
]]>
-Msafeptr=static
Instructs the compiler that global or external pointers and arrays do not overlap or
conflict with each other and are independent.
]]>
-Msafeptr=global
Instructs the C/C++ compiler to override data dependencies between pointers of a given storage class.
]]>
-Msafeptr
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Instructs the compiler to completely unroll loops with a constant loop count of less than
or equal to $1 where $1 is a supplied constant value. If no constant value is given, then a default of 4 is used. A value of 1 inhibits the complete unrolling of loops with constant loop counts.
]]>
N
-Munroll=c:1
"-Munroll=n:n" instructs the compiler to unroll loops $1 times where $1 is a supplied constant value.
If no constant value is given, then a default of 4 is used.
]]>
N
-Munroll=n:n
"-Munroll=m:n" instructs the compiler to unroll loops with multiple blocks $1 times where $1 is a supplied constant value.
If no constant value is given, then a default of 4 is used.
]]>
N
-Munroll=m:n
Instructs the compiler to unroll loops with multiple blocks using the default value of 4 times
]]>
-Munroll=m
Invokes the loop unroller.
]]>
-Munroll
Disable loop unrolling. <Default>
]]>
-Mnounroll
Don't check dependence relations for vector or parallel code.
]]>
Allow parallelization of loops with conditional scalar assignments.
]]>
Generate code to check for zero loop increments.
]]>
Enable an optional post-pass instruction scheduling.
]]>
-Msmart
Disable an optional post-pass instruction scheduling. <Default>
]]>
-Mnosmart
CPU2006 flags file rule used to split an optimization flag containing sub-options into multiple flag descriptions.
Please refer to the flag file rule of the various sub-options for the actual flag description.
Disable automatic vector pipelining. <Default>
]]>
-Mnovect
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
- Altcode base on array alignments calculated dynamically at runtime.
The compiler also determines suitable loop count and array alignment conditions for executing the altcode.
]]>
-Mvect=altcode
Disables alternate code generation for vectorized loops.
]]>
-Mvect=noaltcode
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.
]]>
-Mvect=assoc
Instructs the vectorizer to disable associativity conversions.
]]>
-Mvect=noassoc
Instructs the vectorizer, when performing cache tiling optimizations, to assume a cache size of $1.
The default size is processor dependent.
]]>
N
-Mvect=cachesize:n
Instructs the vectorizer to enable loop fusion.
]]>
-Mvect=fuse
Instructs the vectorizer to disable vectorization of indirect array references.
]]>
-Mvect=nogather
Instructs the vectorizer to enable idiom recognition.
]]>
-Mvect=idiom
Instructs the vectorizer to disable idiom recognition.
]]>
-Mvect=noidiom
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.
]]>
-Mvect=nosizelimit
Instructs the vectorizer to generate partial vectorization.
]]>
-Mvect=partial
Instructs the vectorizer to generate prefetch instructions.
]]>
-Mvect=prefetch
Enables generation of packed SSE instructions for short
vector operations that arise from scalar code outside of loops or within
the body of a loop iteration.
]]>
-Mvect=short
Instructs the vectorizer to search for vectorizable loops and, where possible, make use of
SSE, SSE2, and prefetch instructions.
]]>
-Mvect=sse
Instructs the driver to disable the -Mvect=sse option which is part of the "-fast" option.
]]>
-Mvect=nosse
Enable automatic vector pipelining.
]]>
-Mvect
Disables -Ktrap=fp.
]]>
-Mnofptrap
-Ktrap is only processed by the compilers when compiling main functions' programs. The options inv, denorm, divz, ovf, unf, and inexact correspond to the processor's exception mask bits invalid operation, denormalized operand, divide-by-zero, overflow, underflow, and precision, respectively. Normally, the processor's exception mask bits are on (floating-point exceptions are masked the processor recovers from the exceptions and continues). If a floating-point exception occurs and its corresponding mask bit is off (or unmasked ), execution terminates with an arithmetic exception (C's SIGFPE signal). -Ktrap=fp is equivalent to -Ktrap=inv,divz,ovf.
]]>
-Ktrap=fp
Enable long branches.
]]>
-Mlongbranch
Link with the AMD Core Math Library. Available from www.amd.com
]]>
-lacml
Use the -mp option to instruct the compiler to interpret user-inserted OpenMP shared-memory parallel programming directives and generate an executable file which will utilize multiple processors in a shared-memory parallel system.
When used strictly as a linker flag, the PGI OpenMP runtime will be linked and users can use the environment variables MP_BIND and MP_BLIST to bind a serial program to a CPU.
]]>
-mp
The align sub-option to -mp forces loop iterations to be allocated to OpenMP processes using an algorithm that maximizes alignment of vector sub-sections in loops that are both parallelized and vectorized for SSE. This can improve performance in program units that include many such loops. It can result in load-balancing problems that significantly decrease performance in program units with relatively short loops that contain a large amount of work in each iteration.
]]>
-mp=align
The numa suboption to -mp uses libnuma on systems where it is available.
]]>
-mp=numa
The nonuma suboption to -mp tells the driver to not link with libnuma.
]]>
-mp=nonuma
(For use only on 64-bit Linux targets) Generate code for the medium memory model in the linux86-64 execution environment. The default small memory model of the linux86-64 environment limits the combined area for a user's object or executable to 1GB, with the Linux kernel managing usage of the second 1GB of address for system routines, shared libraries, stacks, etc. Programs are started at a fixed address, and the program can use a single instruction to make most memory references. The medium memory model allows for larger than 2GB data areas, or .bss sections. Program units compiled using either -mcmodel=medium or -fpic require additional instructions to reference memory. The effect on performance is a function of the data-use of the application. The -mcmodel=medium switch must be used at both compile time and link time to create 64-bit executables. Program units compiled for the default small memory model can be linked into medium memory model executables as long as they are compiled -fpic, or position-independent.
]]>
-mcmodel=medium
Enable support for 64-bit indexing and single static data objects larger than 2GB in size. This option is default in the presence of -mcmodel=medium. Can be used separately together with the default small memory model for certain 64-bit applications that manage their own memory space.
]]>
-Mlarge_arrays
Enable dead store elimination.
]]>
Enable optimizations using ANSI C type-based pointer disambiguation.
]]>
Set the optimization level to -O2
]]>
-O
A basic block is generated for each C statement. No scheduling is done
between statements. No global optimizations are performed.
]]>
-O0
Level-one optimization specifies local optimization (-O1). The compiler performs scheduling of basic blocks as well as register allocation. This optimization level is a good choice when the code is very irregular; that is it contains many short statements containing IF statements and the program does not contain loops (DO or DO WHILE statements). For certain types of code, this optimization level may perform better than level-two (-O2) although this case rarely occurs.
The PGI compilers perform many different types of local optimizations, including but not limited to:
- Algebraic identity removal
- Constant folding
- Common subexpression elimination
- Local register optimization
- Peephole optimizations
- Redundant load and store elimination
- Strength reductions
Note that this is the default optimiation level when no optimization flags are specified on the compilation command line.
]]>
-O1
Level-two optimization (-O2 or -O) specifies global optimization. The -fast option generally will specify global optimization; however, the -fast switch will vary from release to release depending on a reasonable selection of switches for any one particular release. The -O or -O2 level performs all level-one local optimizations as well as global optimizations. Control flow analysis is applied and global registers are allocated for all functions and subroutines. Loop regions are given special consideration. This optimization level is a good choice when the program contains loops, the loops are short, and the structure of the code is regular.
The PGI compilers perform many different types of global optimizations, including but not limited to:
- Branch to branch elimination
- Constant propagation
- Copy propagation
- Dead store elimination
- Global register allocation
- Invariant code motion
- Induction variable elimination
]]>
-O2
All level 1 and 2 optimizations are performed.
In addition, this level enables more aggressive code hoisting and scalar replacement optimizations that may or may not be profitable.
]]>
-O3
Performs all level 1, 2, and 3 optimizations and enables hoisting of guarded invariant floating point expressions.
]]>
-O4
Create a Unified Binary using multiple targets.
Specify the type of the target processor as AMD64 Processor 32-bit mode.
]]>
-tp k8-32
Specify the type of the target processor as AMD64 Processor 64-bit mode.
]]>
-tp k8-64
Specify the type of the target processor as AMD64 Barcelona Processor 64-bit mode.
]]>
-tp barcelona-64
Specify the type of the target processor as AMD64 Barcelona Processor 32-bit mode.
]]>
-tp barcelona-32
Specify the type of the target processor as AMD64 Shangahi Processor 64-bit mode.
]]>
-tp shanghai-64
Specify the type of the target processor as AMD64 Shanghai Processor 32-bit mode.
]]>
-tp shanghai-32
Specify the type of the target processor as AMD64 Barcelona Processor 32-bit mode.
]]>
-tp barcelona
Specify the type of the target processor as AMD64 Bulldozer Processor 64-bit mode.
]]>
-tp barcelona
Specify the type of the target processor as AMD64 Bulldozer Processor 64-bit mode.
]]>
-tp barcelona
Specify the type of the target processor as Intel Penryn Processor 64-bit mode.
]]>
-tp penryn-64
Specify the type of the target processor as Intel Penryn Processor 32-bit mode.
]]>
-tp penryn-32
Specify the type of the target processor as Intel Nehalem Processor 64-bit mode.
]]>
-tp nehalem-64
Specify the type of the target processor as Intel Nehalem Processor 32-bit mode.
]]>
-tp nehalem-32
Specify the type of the target processor as AMD Istanbul Processor 64-bit mode.
]]>
-tp Istanbul-64
Specify the type of the target processor as AMD Istanbul Processor 32-bit mode.
]]>
-tp istanbul-32
Specify the type of the target processor as Intel Penryn Processor 32-bit mode.
]]>
-tp penryn
Specify the type of the target processor as Intel P7 Architecture with
EM64t, 64-bit mode.
]]>
-tp p7-64
Specify the type of the target processor as Intel P7 Architecture (Pentium
4, Xeon, Centrino).
]]>
-tp p7
Specify the type of the target processor as Intel Core 2 EM64T or compatible architecture using 64-bit mode.
]]>
-tp core2-64
Specify the type of the target processor as Intel Core 2 or compatible architecture using 32-bit mode.
]]>
-tp core2
Use the unified AMD/Intel 64-bit mode.
]]>
-tp x64
Experimental flags.
]]>
Link with static libraries.
]]>
Staticily link with the PGI runtime libraries. System libraries may still be dynamically linked.
]]>
Link with dynamic libraries.
]]>
Link with Dynamic Link Libraries (DLL). Note that -Bdynamic must also be used during compilation as well as linking. Implies -D_DLL.
]]>
-Bdynamic
Disable runtime stack checking and set the stack's reservere size to $1 bytes and commit size to $2 bytes at link time.
]]>
-stack=nocheck,39000000,3900000
N
Pass the flag "-force:multiple" to the linker to create an output file whether or not the linker finds more than one definition for a symbol. This flag is required when linking with either PGI's Alloc library (-Msmartalloc) or Microquill's Smartheap library. Both libraries replace the system's Malloc, Calloc, Realloc, and Free functions.
]]>
-Wl,-force:multiple
Use the Microsoft C++ configuration for Boost. Used with the "boost_msvc_config" src.alt.
]]>
-DSPEC_CPU_BOOST_CONFIG_MSC_VER
400.perlbench Portability flag to get correct definition of "tm" struct.
]]>
-D_MSC_EXTENSIONS
Specifies a directory to search for libraries. Use -L to add directories to the search path for library files.
Multiple -L options are valid. However, the position of multiple -L options is important relative to -l
options supplied.
]]>
-L/path/to/libs
Link using MicroQuill's SmartHeap 8 (32-bit) library for Linux.
Description from Microquill:
SmartHeap is a fast (3X-100X faster than compiler-supplied libraries), portable (Windows, Linux, Solaris, HP-UX, IBM-AIX, Dec OSF Tru64, SGI Irix), reliable, ANSI-compliant malloc/operator new library. SmartHeap supports multiple memory pools, includes a fixed-size allocator, and is thread-safe. SmartHeap also includes comprehensive memory debugging APIs to detect leakage, overwrites, double-frees, wild pointers, out of memory, references to previously freed memory, and other memory errors.
]]>
Link using MicroQuill's SmartHeap 8.1 (32-bit) library for Windows.
Description from Microquill:
SmartHeap is a fast (3X-100X faster than compiler-supplied libraries), portable (Windows, Linux, Solaris, HP-UX, IBM-AIX, Dec OSF Tru64, SGI Irix), reliable, ANSI-compliant malloc/operator new library. SmartHeap supports multiple memory pools, includes a fixed-size allocator, and is thread-safe. SmartHeap also includes comprehensive memory debugging APIs to detect leakage, overwrites, double-frees, wild pointers, out of memory, references to previously freed memory, and other memory errors.
]]>
Link using MicroQuill's SmartHeap 8.1 (64-bit) library for Windows.
Description from Microquill:
SmartHeap is a fast (3X-100X faster than compiler-supplied libraries), portable (Windows, Linux, Solaris, HP-UX, IBM-AIX, Dec OSF Tru64, SGI Irix), reliable, ANSI-compliant malloc/operator new library. SmartHeap supports multiple memory pools, includes a fixed-size allocator, and is thread-safe. SmartHeap also includes comprehensive memory debugging APIs to detect leakage, overwrites, double-frees, wild pointers, out of memory, references to previously freed memory, and other memory errors.
]]>
Assume free-format source code.
]]>