Index

32-bit mode
Selecting Compilation Modes
Using Typedefs
Also see n32
Porting Code to N32 and 64-Bit SGI Systems
compatibility
Compatibility
data types
Using Data Types
definition
Porting Code to N32 and 64-Bit SGI Systems
libraries
Compatibility
n32 definition
Porting Code to N32 and 64-Bit SGI Systems
overflow
Arithmetic with long Types
porting to n32
N32 Porting Guidelines

64-bit mode
Selecting Compilation Modes
Coding for 64-Bit Programs
data types
Using Data Types
libraries
Compatibility
unsigned integers
Coding Assumptions to Avoid

ABI specification
Using a Defaults Specification File

address aliases
Alias and Address Taken Analysis

address space
Dynamic Loading Under Program Control

addresses, optimization
Hints for Writing Programs

alias analysis
Alias and Address Taken Analysis

aliasing
and pointer placement
Hints for Writing Programs
memory
Using the -OPT:alias Option
optimization
Hints for Writing Programs

align/fill pragmas
Fill/Align Symbol

analysis, dependence
Dependence Analysis

analyzer, parallel
About the MIPSpro Compiler System

a.out files
Linking

ar command
Using the Archiver to Create Libraries

archive libraries
Using Dynamic Shared Objects

archiver. See ar command
Using the Archiver to Create Libraries

argument registers
Using Predefined Types

arguments
store
Using Predefined Types

arrays
2 gigabyte
Maximum Memory Allocation

as assembler
Linking Assembly Language Programs

assembly language programs
porting to n32
Source Code Changes

assembly language programs, linking
Linking Assembly Language Programs

back substitution
Recurrence Breaking

bit masks
Guidelines for Writing Code for 64-Bit SGI Platforms

BLOCK data
Building a DSO with -Bsymbolic

block padding
Common Block Padding
restrictions
Common Block Padding

blocking and permutation transformations
Blocking and Permutation Transformations

branch elimination
if Conversion

-Bsymbolic, compiling
Building a DSO with -Bsymbolic

build procedure
n32
Build Procedure

byte counters
and file size
Using Large Files with XFS

C language
floating point
Controlling Floating-Point Optimization
precompiled headers
Using Precompiled Headers in C and C++

-c option
About the MIPSpro Compiler System

C programs
optimization
Hints for Writing Programs

C++
language definitions
Creating a Header File for Multiple Languages
precompiled headers
Using Precompiled Headers in C and C++

C++ programs
optimization
Hints for Writing Programs

cache
conflicts and padding
Common Block Padding
improving instruction performance
Reordering Code Regions
misses
Prefetching

cache parameters
controlling with lno
Compiler Options for LNO

char
Using Data Types

-clist option
Running LNO

code
arithmetic
Arithmetic with long Types
assumptions
Coding Assumptions to Avoid
conversion
if Conversion
executed at startup
Controlling Execution Frequency
hints
Coding Assumptions to Avoid
overflow 32 bits
Arithmetic with long Types
portable
Guidelines for Writing Code for 64-Bit SGI Platforms
porting to 64-bit system
Porting Code to 64-Bit SGI Systems
porting to n32-bit systems
Porting Code to N32 and 64-Bit SGI Systems
rarely executed
Controlling Execution Frequency
shifts
Arithmetic with long Types
signed ints
Suggestions for C and C++ Programs
sizeof(int)==sizeof(long)
sizeof(int) == sizeof(long)
sizeof(int)==sizeof(void*)
sizeof(int) == sizeof(void *)
sizeof(long)==4
sizeof(long) == 4
sizeof(void*)==4
sizeof(void *) == 4
transformation
if Conversion
typedefs
Using Typedefs
view transformations
Running LNO
writing for 64-bit applications
Coding for 64-Bit Programs
zero-extension
Suggestions for C and C++ Programs

code generator
The Code Generator
Also see optimizing programs
The Code Generator
and optimization levels
Code Generator and Optimization Levels
Code Generator and Optimization Levels -O2 and -O3
back substitution
Recurrence Breaking
branch elimination
if Conversion
cross-iteration optimization
Cross-Iteration Optimizations
read-write elimination
Cross-Iteration Optimizations
sub-expression elimination
Cross-Iteration Optimizations
write-write elimination
Cross-Iteration Optimizations
feedback
Frequency and Feedback
frequency of execution
Frequency and Feedback
if conversion
if Conversion
if conversion and floating points
if Conversion
instruction-level parallelism
if Conversion
latency
Prefetch and Load Latency
loop unrolling
Loop Unrolling
Modifying Code Generator Defaults
memory exceptions
if Conversion
modify default
Modifying Code Generator Defaults
-O0 option
Code Generator and Optimization Levels
-O1 option
Code Generator and Optimization Levels
-O2 option
Code Generator and Optimization Levels -O2 and -O3
-O3 option
Code Generator and Optimization Levels -O2 and -O3
prefetch
Prefetch and Load Latency
R10000 optimization
if Conversion
recurrence breaking
Recurrence Breaking
software pipelining
Software Pipelining
Modifying Code Generator Defaults
steps at -O2 and -O3
Steps Performed by the Code Generator at Levels -O2 and -O3

common block padding
Common Block Padding
restrictions
Common Block Padding

Common object file format
Executable and Linking Format

COMMON symbols
Building a DSO with -Bsymbolic

compiler back end
About the MIPSpro Compiler System

compiler drivers
About the MIPSpro Compiler System

compiler front end
About the MIPSpro Compiler System

compiler options. See drivers
Compiler Drivers

compiler system
components
About the MIPSpro Compiler System
macros
Using Predefined Types
overview
About the MIPSpro Compiler System
predefined types
Using Predefined Types

compiler system components
About the MIPSpro Compiler System

COMPILER_DEFAULTS_PATH environment variable
Using a Defaults Specification File

compiler.defaults file
Using a Defaults Specification File

compiling with -Bsymbolic
Building a DSO with -Bsymbolic

constant format strings
Guidelines for Writing Code for 64-Bit SGI Platforms

constants
Constants with the High-Order Bit Set
negative values
Guidelines for Writing Code for 64-Bit SGI Platforms

conversion of code
if Conversion

cord command
Reordering with cord

cording
Reordering Code Regions
Reordering Code Regions
Reordering Code Regions

counters, internal byte
Using Large Files with XFS

cpp preprocessor
About the MIPSpro Compiler System

cross-file inlining
Inlining Options for Routines

cross-iteration optimization
Cross-Iteration Optimizations
read-read elimination
Cross-Iteration Optimizations
read-write elimination
Cross-Iteration Optimizations
sub-expression elimination
Cross-Iteration Optimizations
write-write elimination
Cross-Iteration Optimizations

-D_MIPS_FPSET
Using Predefined Types

-D_MIPS_ISA
Using Predefined Types

-D_MIPS_SIM
Using Predefined Types

-D_MIPS_SZINT
Using Predefined Types

-D_MIPS_SZLONG
Using Predefined Types

-D_MIPS_SZPTR
Using Predefined Types

data
prefetching
Prefetching

data type
signed
Suggestions for C and C++ Programs

data types
sizes
Using Data Types

debugging
driver options
Debugging
floating points
Debugging Floating-Point Problems

defaults
compilation modes
Selecting Compilation Modes
specification file
Using a Defaults Specification File

definition
Reordering Code Regions

dependence analysis
Dependence Analysis

directives
LNO
Pragmas and Directives for LNO

dis command
Getting Information About Object Files
Disassembling Object Files with dis
Disassembling Object Files with dis

disassemble object file
Getting Information About Object Files

dlclose()
Dynamic Loading Under Program Control

dlerror()
Dynamic Loading Under Program Control

dlopen()
Dynamic Loading Under Program Control

dlsym()
Dynamic Loading Under Program Control

double
Using Data Types

drivers
as assembler
Linking Assembly Language Programs
bypassing
About the MIPSpro Compiler System
-c option
About the MIPSpro Compiler System
defaults
Using a Defaults Specification File
Compiler Drivers
fec preprocessor
About the MIPSpro Compiler System
file name suffixes
Source File Naming Conventions
input file suffixes
Source File Naming Conventions
linking
About the MIPSpro Compiler System
omit linking
About the MIPSpro Compiler System
optimizing programs
Controlling Floating-Point Optimization
options
Compiler Drivers
Debugging
-show option
About the MIPSpro Compiler System
stages of compilation
About the MIPSpro Compiler System

DSO
benefits
Benefits of Using DSOs

DSOs
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
Dynamic Shared Objects
Using Dynamic Shared Objects
building new dsos
Building DSOs
converting libraries
Converting Archive Libraries to DSOs
creating dsos
Building DSOs
dlclose()
Dynamic Loading Under Program Control
dlerror()
Dynamic Loading Under Program Control
dlopen()
Dynamic Loading Under Program Control
dlsym()
Dynamic Loading Under Program Control
dynamic loading diagnostics
Dynamic Loading Under Program Control
exporting symbols
Controlling Symbols to Be Exported or Loaded
guidelines
Guidelines for Using Shared Libraries
hiding symbols
Controlling Symbols to Be Exported or Loaded
libraries, shared
Guidelines for Using Shared Libraries
linking
Linking to Previously Built Dynamic Shared Objects
loading dynamically
Dynamic Loading Under Program Control
mmap() system call
Dynamic Loading Under Program Control
munmap() system call
Dynamic Loading Under Program Control
naming conventions
Creating DSOs
QuickStart
Taking Advantage of QuickStart
search path
Searching for DSOs at Run Time
sgidladd()
Dynamic Loading Under Program Control
shared libraries
Guidelines for Using Shared Libraries
starting quickly
Taking Advantage of QuickStart
unloading dynamically
Dynamic Loading Under Program Control
versioning
The Versioning Mechanism

dump command. See elfdump
Listing Parts of ELF Object Files and Libraries with elfdump

DWARF symbolic information
Listing Parts of DWARF Object Files with dwarfdump

dwarfdump command
Getting Information About Object Files
Listing Parts of DWARF Object Files with dwarfdump

dynamic linking
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
Dynamic Loading Under Program Control

Dynamic shared objects. See DSOs
Linking to Previously Built Dynamic Shared Objects

Elf object file
Listing Parts of DWARF Object Files with dwarfdump

ELF. See executable and linking format
Executable and Linking Format

elfdump command
Getting Information About Object Files
Listing Parts of ELF Object Files and Libraries with elfdump
Listing Parts of ELF Object Files and Libraries with elfdump
command syntax
Listing Parts of ELF Object Files and Libraries with elfdump

elimination
branches
if Conversion
read-read
Cross-Iteration Optimizations
read-write
Cross-Iteration Optimizations
sub-expression
Cross-Iteration Optimizations
write-write
Cross-Iteration Optimizations

environment variable
COMPILER_DEFAULTS_PATH
Using a Defaults Specification File

environment variables
32-bit compilation
Setting an Environment Variable
64-bit compilation
Setting an Environment Variable
n32-bit compilation
Setting an Environment Variable

executable and linking format
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
Executable and Linking Format

executable files
Executable and Linking Format

execution
controlling
Controlling Execution Frequency

exporting symbols
Controlling Symbols to Be Exported or Loaded

expressions
optimizing
Other Options to Control Floating Point Behavior

extension
sign
Arithmetic with long Types
zero
Arithmetic with long Types

f77/90 compiler
About the MIPSpro Compiler System

fec preprocessor
bypassing
About the MIPSpro Compiler System

feedback
and code generator
Frequency and Feedback

fef77/90p analyzer
About the MIPSpro Compiler System

file command
Getting Information About Object Files
Determining File Type with file
command syntax
Determining File Type with file
options
Determining File Type with file

file inlining
Performance Tuning with Interprocedural Analysis (IPA)

file type, determining
Determining File Type with file

files
2 gigabyte size
Using Large Files with XFS
compilation specification
Using a Defaults Specification File
executable
Executable and Linking Format
header
Header and Include Files
include
Header and Include Files
internal byte counters
Using Large Files with XFS
listing properties
Getting Information About Object Files
naming conventions
Source File Naming Conventions
precompiled header
Using Precompiled Headers in C and C++
relocatable
Executable and Linking Format
size
Using Large Files with XFS

fill/align pragmas
Fill/Align Symbol

fission
LNO
Fission/Fusion
loops
Loop Fission/Distribution

-flist option
Running LNO

float
Using Data Types

float.h include file
Using Data Types

floating points
debugging
Debugging Floating-Point Problems
if conversion
if Conversion
optimization
Controlling Floating-Point Optimization
optimizing
Other Options to Control Floating Point Behavior
reassociation
Other Options to Control Floating Point Behavior

format
object file
About the MIPSpro Compiler System
Object File Format and Dynamic Linking

Fortran
floating point
Controlling Floating-Point Optimization
padding global arrays
Common Block Padding
program optimization
An Example of Local Optimization for Fortran

Fortran programs
optimization
Hints for Writing Programs

functions
implicitly declared
Implicitly Declared Functions

fusion
LNO
Fission/Fusion
loop
Loop Fusion

-g option
Debugging

gather-scatter
Gather-Scatter Optimization

global arrays
padding
Common Block Padding

global offset table
Position-Independent Code

global optimizer
Programming Hints for Improving Optimization

GOT
Position-Independent Code

guidelines
porting
N32 Porting Guidelines

header files
Header and Include Files
multiple languages
Creating a Header File for Multiple Languages
portable
Guidelines for Writing Code for 64-Bit SGI Platforms
precompiled
Using Precompiled Headers in C and C++
specification
Specifying a Header File

high-order bit
Constants with the High-Order Bit Set

IEEE
floating points
-OPT:IEEE_arithmetic=n
optimization
-OPT:IEEE_arithmetic=n

if conversion
if Conversion

if-then-else statements
optimization
Use Tables Rather Than if-then-else or switch Statements

implicitly declared function
Implicitly Declared Functions

include files
Header and Include Files
float.h
Using Data Types
inttypes.h
Using Typedefs
limits.h
Using Data Types
multiple languages
Creating a Header File for Multiple Languages
n32
Porting Environment
specification
Specifying a Header File

indirect
calls, using
Hints for Writing Programs

-INLINE
Inlining Options for Routines
all option
Inlining Options for Routines
file option
Inlining Options for Routines
must option
Inlining Options for Routines
never option
Inlining Options for Routines
none option
Inlining Options for Routines

inliner
standalone
Inlining Options for Routines

inlining
Performance Tuning with Interprocedural Analysis (IPA)
benefits
Inlining

input file names
Source File Naming Conventions

instruction
mips4 rsqrt
Other Options to Control Floating Point Behavior
prefetching
Prefetching

instruction cache access
improving
Reordering Code Regions

instruction-level parallelism
if Conversion

int
sizeof(int) == sizeof(void *)
Using Data Types
Using Typedefs

integer
overflow
Simplifying Code with the -OPT Option
scaling
Guidelines for Writing Code for 64-Bit SGI Platforms

integers
64-bit registers
Coding Assumptions to Avoid

interleaving
reduction
Recurrence Breaking

internal byte counters
and file size
Using Large Files with XFS

inttypes.h include file
Using Typedefs

IPA
About the MIPSpro Compiler System
addressing=ON option
The -IPA:addressing=ON Option
alias=ON option
The -IPA:alias=ON Option

ISA specification
Using a Defaults Specification File

latency
and code generator
Prefetch and Load Latency

ld
and assembly language programs
Linking Assembly Language Programs
dynamic linking
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
example
Linker Example
libraries, default search path
Specifying Libraries and DSOs
libraries, specifying
Linking Libraries
link editor
About the MIPSpro Compiler System
multilanguage programs
Linking Multilanguage Programs
-shared option
Creating DSOs

ld command
to reorder code
Reordering with ld

LD_BIND_NOW
Run-Time Symbol Resolution

libc
Dynamic Loading Under Program Control

libraries
archive
Using Dynamic Shared Objects
converting to dsos
Converting Archive Libraries to DSOs
global data
Tuning Shared Library Code
header files
Header and Include Files
libc
Dynamic Loading Under Program Control
locality
Tuning Shared Library Code
paging
Tuning Shared Library Code
routines to exclude
Choosing DSO Library Members
routines to include
Choosing DSO Library Members
self-contained
Choosing DSO Library Members
shared
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
shared, static
Using Dynamic Shared Objects
specifying
Linking Libraries
static data
Choosing DSO Library Members
tuning
Tuning Shared Library Code

lib.so functions
optimization
Suggestions for C and C++ Programs

limits.h include file
Using Data Types

linking
dynamic. See ld
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
omit
About the MIPSpro Compiler System

linking. See ld
Linking Multilanguage Programs

LNO. See optimizing programs, -LNO option
Controlling Loop Nest Optimizations (LNO)

loading
symbols
Controlling Symbols to Be Exported or Loaded

local variables
optimization
Hints for Writing Programs

long
Using Data Types
Using Typedefs

long double
Using Data Types

long long
Using Data Types

loop interchange
Loop Interchange

loop unrolling
code generator
Loop Unrolling

loop-nest optimization. See optimizing programs, -LNO option
Controlling Loop Nest Optimizations (LNO)

loops
fission
Loop Fission/Distribution
fusion
Loop Fusion
interchanging
Loop Interchange
parallel
Gather-Scatter Optimization

machine instructions
Getting Information About Object Files

macros
NARGSAVE
Using Predefined Types
predefined
Using Predefined Types
typedefs
Using Typedefs

makefiles
Porting Environment

maximum integer type
Using Typedefs

memory
2 gigabyte arrays
Maximum Memory Allocation
referencing
Using the -OPT:alias Option

memory allocation
arrays
Maximum Memory Allocation

memory exceptions
if conversion
if Conversion

MIPS instruction set architecture
Using Predefined Types

mips4 rsqrt instruction
Other Options to Control Floating Point Behavior

mmap() system call
Dynamic Loading Under Program Control

mode
32-bit
Selecting Compilation Modes
64-bit
Selecting Compilation Modes
n32-bit
Selecting Compilation Modes

multilanguage programs
and ld
Linking Multilanguage Programs
header files
Creating a Header File for Multiple Languages

munmap() system call
Dynamic Loading Under Program Control

n32
Porting Environment
assembly language programs
Source Code Changes
build procedure
Build Procedure
include files
Porting Environment
libraries
Compatibility
Porting Environment
porting environment
Porting Environment
porting guidelines
N32 Porting Guidelines
runtime issues
Run-time Issues
source code changes
Source Code Changes

n32-bit mode
Selecting Compilation Modes

naming source files
Source File Naming Conventions

NARGSAVE macro
Using Predefined Types

negative values
problems
Guidelines for Writing Code for 64-Bit SGI Platforms

nm command
Getting Information About Object Files
Listing Symbol Table Information: nm
command syntax
Listing Symbol Table Information: nm
example
Listing Symbol Table Information: nm
example of undefined symbol
Finding an Unresolved Symbol with ld
undefined symbol
Finding an Unresolved Symbol with ld

object file information
disassemble
Getting Information About Object Files
format
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
listing file properties
Getting Information About Object Files
listing section sizes
Determining Section Sizes with size
symbol table information
Getting Information About Object Files
Listing Symbol Table Information: nm
tools
Getting Information About Object Files
using
Getting Information About Object Files
using dwarfdump
Getting Information About Object Files
using elfdump
Getting Information About Object Files
Listing Parts of ELF Object Files and Libraries with elfdump

operating system
64 bit
Coding for 64-Bit Programs

operations
relational
Simplifying Code with the -OPT Option
unsigned relational
Simplifying Code with the -OPT Option

-OPT option
div_split option
Other Options to Control Floating Point Behavior
fold_reassociate option
Other Options to Control Floating Point Behavior
fold_unsafe_relops
Simplifying Code with the -OPT Option
fold_unsigned_relops option
Simplifying Code with the -OPT Option

optimization
Optimizing Program Performance
addresses
Hints for Writing Programs
Also see optimizing programs
Controlling Loop Nest Optimizations (LNO)
C programs
Hints for Writing Programs
C++ programs
Hints for Writing Programs
Fortran
Hints for Writing Programs
function return values
Hints for Writing Programs
global
Programming Hints for Improving Optimization
if-then-else statements
Use Tables Rather Than if-then-else or switch Statements
libc.so functions
Suggestions for C and C++ Programs
pointer placement
Hints for Writing Programs
signed data types
Suggestions for C and C++ Programs
STDARG
Hints for Writing Programs
stdarg.h
Hints for Writing Programs
switch statements
Use Tables Rather Than if-then-else or switch Statements
tables
Use Tables Rather Than if-then-else or switch Statements
tips for improving
Programming Hints for Improving Optimization
unions
Hints for Writing Programs
value parameters
Hints for Writing Programs
VARARG
Hints for Writing Programs
varargs.h
Hints for Writing Programs
variables, global vs. local
Hints for Writing Programs

optimizer
About the MIPSpro Compiler System

optimizing programs
alias analysis
Alias and Address Taken Analysis
Also see code generator
The Code Generator
benefits
Optimization Overview
cache
Prefetching
code generator
The Code Generator
common block padding
Common Block Padding
restrictions
Common Block Padding
debugging
Optimization Overview
dependence analysis
Dependence Analysis
execution frequency
Controlling Execution Frequency
fill/align pragmas
Fill/Align Symbol
floating points
Controlling Floating-Point Optimization
Fortran optimization
An Example of Local Optimization for Fortran
IEEE floating points
-OPT:IEEE_arithmetic=n
-INLINE
Inlining Options for Routines
inlining benefits
Inlining
interprocedural analysis
Performance Tuning with Interprocedural Analysis (IPA)
-LNO option
Controlling Loop Nest Optimizations (LNO)
blocking
Blocking and Outer Loop Unrolling
code transformation
Running LNO
controlling cache parameters
Compiler Options for LNO
directives
Pragmas and Directives for LNO
fission
Fission/Fusion
fusion
Fission/Fusion
gather-scatter
Gather-Scatter Optimization
loop fission
Loop Fission/Distribution
loop fusion
Loop Fusion
loop interchange
Loop Interchange
outer loop unrolling
Blocking and Outer Loop Unrolling
pragmas
Pragmas and Directives for LNO
prefetching
Prefetching
running LNO
Running LNO
-OPT option
-OPT:roundoff=n
alias=any option
Using the -OPT:alias Option
alias=disjoint option
Using the -OPT:alias Option
alias=name option
Using the -OPT:alias Option
alias=restrict option
Using the -OPT:alias Option
alias=typed option
Using the -OPT:alias Option
alias=unnamed option
Using the -OPT:alias Option
div_split option
Other Options to Control Floating Point Behavior
fast_complex option
Other Options to Control Floating Point Behavior
fast_exp option
Other Options to Control Floating Point Behavior
fast_io option
Other Options to Control Floating Point Behavior
fast_sqrt option
Other Options to Control Floating Point Behavior
fold_reassociate option
Other Options to Control Floating Point Behavior
fold_unsafe_relops
Simplifying Code with the -OPT Option
fold_unsigned_relops
Simplifying Code with the -OPT Option
IEEE option
Controlling Floating-Point Optimization
IEEE_arithmetic option
-OPT:IEEE_arithmetic=n
recip option
Other Options to Control Floating Point Behavior
roundoff option
Controlling Floating-Point Optimization
-OPT:roundoff=n
rsqrt option
Other Options to Control Floating Point Behavior
pragmas, mips_frequency_hint
Controlling Execution Frequency
prefetch pragmas
Prefetch
reordering code
Reordering Code Regions
-TARG option
madd option
Other Options to Control Floating Point Behavior
transformation pragmas
Blocking and Permutation Transformations
transformations
-OPT:roundoff=n

overflow
integer
Simplifying Code with the -OPT Option
integers
Simplifying Code with the -OPT Option

overflow of code
Arithmetic with long Types

padding, blocks
Common Block Padding
restrictions
Common Block Padding

page faults
improving performance
Reordering Code Regions

page size
Tuning Shared Library Code

paging
alignment
Tuning Shared Library Code

parallel analyzer
About the MIPSpro Compiler System

parallel loops
Gather-Scatter Optimization

parameters
optimization
Hints for Writing Programs

pca analyzer
About the MIPSpro Compiler System

PIC. See position-independent code
About the MIPSpro Compiler System
Object File Format and Dynamic Linking

pointer
sizeof(int) == sizeof(void *)
Using Data Types
Using Typedefs

pointer placement
and aliasing
Hints for Writing Programs
example
Hints for Writing Programs
Hints for Writing Programs

pointers
referencing memory
Using the -OPT:alias Option

porting code
Porting Code to 64-Bit SGI Systems

porting guidelines
N32 Porting Guidelines

position-independent code
About the MIPSpro Compiler System
Object File Format and Dynamic Linking
Position-Independent Code

pragmas
LNO
Pragmas and Directives for LNO
mips_frequency_hint
Controlling Execution Frequency

precompiled header files
Using Precompiled Headers in C and C++
automatic
Automatic Precompiled Header Processing
controlling
Other Ways to Control Precompiled Headers
deletion
Automatic Precompiled Header Processing
performance
PCH Performance Issues
requirements
Automatic Precompiled Header Processing
reuse
Automatic Precompiled Header Processing

prefetch
and code generator
Prefetch and Load Latency

prefetch pragmas
Prefetch

prefetching instructions
Prefetching

preprocessing
About the MIPSpro Compiler System

printf command
Guidelines for Writing Code for 64-Bit SGI Platforms

problems
sizeof(void *) == 4
constants
Constants with the High-Order Bit Set
floating points
Debugging Floating-Point Problems
implicitly declared functions
Implicitly Declared Functions
negative values
Guidelines for Writing Code for 64-Bit SGI Platforms
porting code
Coding Assumptions to Avoid
printf
Guidelines for Writing Code for 64-Bit SGI Platforms
scanf
Guidelines for Writing Code for 64-Bit SGI Platforms
sizeof(int)==sizeof(long)
sizeof(int) == sizeof(long)
sizeof(int)==sizeof(void*)
sizeof(int) == sizeof(void *)
sizeof(long)==4
sizeof(long) == 4
solving
Solving Porting Problems
types
Coding Assumptions to Avoid

processor specification
Using a Defaults Specification File

prof
and SpeedShop
Using SpeedShop

QuickStart DSOs. See DSOs, QuickStart
Taking Advantage of QuickStart
Taking Advantage of QuickStart

read-read elimination
Cross-Iteration Optimizations

read-write elimination
Cross-Iteration Optimizations

recurrence breaking
back substitution
Recurrence Breaking
code generator
Recurrence Breaking
reduction interleaving
Recurrence Breaking

reduction interleaving
Recurrence Breaking

registers
64-bit
Coding Assumptions to Avoid
argument
Using Predefined Types
blocking
Blocking and Outer Loop Unrolling
temp
Using Predefined Types

relational operations
unsigned
Simplifying Code with the -OPT Option

relational operators
integer overflow
Simplifying Code with the -OPT Option

relocatable files
Executable and Linking Format

relocation bits, removing
Getting Information About Object Files

remove
relocation bits
Getting Information About Object Files
symbol table
Getting Information About Object Files

reordering code
Reordering Code Regions
Reordering Code Regions
with sswsextr
Reordering with cord

resolve text symbols
Run-Time Symbol Resolution

return values, optimization
Hints for Writing Programs

rld
dynamic linking
Dynamic Loading Under Program Control
libc
Dynamic Loading Under Program Control
search path
Searching for DSOs at Run Time

roundoff
floating points
-OPT:roundoff=n
optimization
-OPT:roundoff=n

rsqrt instruction
Other Options to Control Floating Point Behavior

RTLD_GLOBAL
Dynamic Loading Under Program Control

RTLD_LAZY
Dynamic Loading Under Program Control

RTLD_LOCAL
Dynamic Loading Under Program Control

RTLD_NOW
Dynamic Loading Under Program Control

runtime issues
n32
Run-time Issues

scalar variables
word size
Use 32-Bit or 64-Bit Scalar Variables

scanf function
Guidelines for Writing Code for 64-Bit SGI Platforms

search path
rld
Searching for DSOs at Run Time

selecting
compilation mode
Selecting Compilation Modes
instruction set
Selecting Compilation Modes
ISA
Selecting Compilation Modes
processor
Selecting Compilation Modes

sgidladd()
Dynamic Loading Under Program Control

shared libraries, static
Using Dynamic Shared Objects

shared library
About the MIPSpro Compiler System
Object File Format and Dynamic Linking

shared objects, dynamic
Using Dynamic Shared Objects

short
Using Data Types

-showoption
About the MIPSpro Compiler System

-show_defaults option
Using a Defaults Specification File

sign bit set
Constants with the High-Order Bit Set

sign extension
sizeof(int) == sizeof(void *)
Arithmetic with long Types

signed data type
optimization
Suggestions for C and C++ Programs

signed ints
64-bit code
Suggestions for C and C++ Programs
64-bit registers
Coding Assumptions to Avoid

size command
Getting Information About Object Files
Determining Section Sizes with size
Determining Section Sizes with size
command syntax
Determining Section Sizes with size
example
Determining Section Sizes with size

sizeof(int)==sizeof(long)
sizeof(int) == sizeof(long)

sizeof(int)==sizeof(void*)
sizeof(int) == sizeof(void *)

sizeof(long)==4
sizeof(long) == 4

sizeof(void*)==4
sizeof(void *) == 4
sizeof(void *) == 4

software pipelining
and code generator
Software Pipelining

source code
n32
Source Code Changes

source file names
Source File Naming Conventions

specifying compilation mode
Using a Defaults Specification File

SpeedShop
Using SpeedShop
Using SpeedShop
prof command
Using SpeedShop
ssrun command
Using SpeedShop

sscord command
to reorder code
Reordering with cord
Reordering with ld

ssorder command
to reorder code
Reordering with cord
Reordering with ld

ssrun command
to reorder code
Reordering with cord
Reordering with ld

sswsextr command
to reorder code
Reordering with cord
Reordering with ld

standalone inliner
Inlining Options for Routines

STDARG. See optimization
Hints for Writing Programs

stdarg.h
Hints for Writing Programs

stdio.h header file
Header and Include Files

storing arguments
Using Predefined Types

strings
printf
Guidelines for Writing Code for 64-Bit SGI Platforms
scanf
Guidelines for Writing Code for 64-Bit SGI Platforms

strip command
Getting Information About Object Files
Removing Symbol Table and Relocation Bits with strip

sub-expression elimination
Cross-Iteration Optimizations

suffixes
input files
Source File Naming Conventions

switch statements
optimization
Use Tables Rather Than if-then-else or switch Statements

symbol resolution
Run-Time Symbol Resolution

symbol table
data
Getting Information About Object Files
get listing
Listing Symbol Table Information: nm
removing
Getting Information About Object Files

symbols
exporting
Controlling Symbols to Be Exported or Loaded
fill, align
Fill/Align Symbol
loading
Controlling Symbols to Be Exported or Loaded

temp registers
Using Predefined Types

TLB misses
improving performance
Reordering Code Regions

transformation
of code
if Conversion

transformation pragmas
Blocking and Permutation Transformations

transformations
view code
Running LNO

troubleshooting
constants
Constants with the High-Order Bit Set
implicitly declared functions
Implicitly Declared Functions
negative values
Guidelines for Writing Code for 64-Bit SGI Platforms
printf
Guidelines for Writing Code for 64-Bit SGI Platforms
scanf
Guidelines for Writing Code for 64-Bit SGI Platforms
sizeof(int)==sizeof(long)
sizeof(int) == sizeof(long)
sizeof(int)==sizeof(void*)
sizeof(int) == sizeof(void *)
sizeof(long)==4
sizeof(long) == 4
sizeof(void*)==4
sizeof(void *) == 4
solving problems
Solving Porting Problems

truncation of code
Arithmetic with long Types

type, determining for files
Determining File Type with file

typedefs
Guidelines for Writing Code for 64-Bit SGI Platforms
Using Typedefs

types
assumptions
Coding Assumptions to Avoid
change in size
Constants with the High-Order Bit Set
char
Using Data Types
constants
Constants with the High-Order Bit Set
double
Using Data Types
float
Using Data Types
int
sizeof(int) == sizeof(void *)
Using Data Types
Using Typedefs
largest integer type
Using Typedefs
long
Using Data Types
Using Typedefs
long double
Using Data Types
long long
Using Data Types
pointer
sizeof(int) == sizeof(void *)
Using Data Types
Using Typedefs
problems
Coding Assumptions to Avoid
scaling integer
Guidelines for Writing Code for 64-Bit SGI Platforms
short
Using Data Types
sizes
Using Data Types

unions
optimization
Hints for Writing Programs

unrolling loops
Blocking and Outer Loop Unrolling
Blocking and Permutation Transformations
Loop Unrolling
Modifying Code Generator Defaults

unsigned ints
32-bit
Coding Assumptions to Avoid

unsigned relational operations
Simplifying Code with the -OPT Option

VARARG. See optimization
Hints for Writing Programs

varargs.h
Hints for Writing Programs

variables
scalar
Use 32-Bit or 64-Bit Scalar Variables

virtual address space
Dynamic Loading Under Program Control

word-size scalar variables
Use 32-Bit or 64-Bit Scalar Variables

working set
list file
Reordering with cord

write-write elimination
Cross-Iteration Optimizations

XFS
file size
Using Large Files with XFS

zero extension
Arithmetic with long Types

zero-extension code
Suggestions for C and C++ Programs