Detailed instructions for use are in the User's Guide.
USER'S MANUAL
rs FOR e COMPILERS VAPOGEE
APOGEE-CTM APOGEE-C++TM
n io
HIGHLY OPTIMIZING COMPILERS
WITH INTRODUCTION TO KAPTM & VASTTM PREPROCESSORS & FLEXLMTM LICENSE MANAGER
4.0
APOGEE-FORTRAN 77TM APOGEE-FORTRAN 90TM
© 1990-1996 -- Apogee Software, Inc. Revised November, 1996 for Release 4.0. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the express written permission of Apogee Software, Inc. Information in this document is subject to change without notice and does not represent a commitment on the part of Apogee Software, Inc. The software described in this document is furnished under a license and may be used or copied only in accordance with the terms of such license. Apogee-C, Apogee-C++, Apogee-FORTRAN 77, Apogee-Fortran 90 and the Apogee logo
{
} are trademarks of Apogee Software, Inc.
KAP is a trademark of Kuck and Associates, Inc. VAST is a registered trademark of Pacific-Sierra Research Corporation. UNIX is a registered trademark and is exclusively licensed by X/Open Company, Ltd. SPARC is a registered trademark of SPARC International, Inc. All SPARC trademarks, including microSPARC, SuperSPARC, hyperSPARC, and UltraSPARC are trademarks or registered trademarks of SPARC International, Inc. SunOS, Solaris and SunSoft are trademarks or registered trademarks of Sun Microsystems, Inc. PowerPC is a trademark of International Business Machines Corporation. VAX and VMS are trademarks of Digital Equipment Corporation. Cray is a registered trademark of Cray Research, Inc., and/or Silicon Graphics, Inc. FLEXlm is a trademark of Globetrotter Software. Portions of the FLEXlm Manual are used with permission of Globetrotter Software. All other names are trademarks of their respective holders. Throughout this manual, trademarked names are used without placing a trademark symbol at every occurrence. All such names are used in an editorial fashion only, with no intention of trademark infringement. Inquires concerning trademarks or trademarked products should be directed to the companies involved.
Table of Contents
Table of Contents
Table of Contents ............................................................................................... 3 Preface .................................................................................................................. 9
Contents of this Manual ...........................................................................................9 Typographic Conventions ...................................................................................... 11 Terminology .............................................................................................................12 A 3-minute Guide to Using the Apogee Compilers ...........................................13
Chapter 1
Introduction to the Apogee Compilers........................................................... 15
The Compilation System ........................................................................................15 Optimization ............................................................................................................19 Control of Compiler Behavior ...............................................................................21
Chapter 2
Invoking the Compilers..................................................................................... 23
Compiler Invocation Command ...........................................................................23 Files............................................................................................................................23 Fortran 90 File Names.............................................................................................25 Options......................................................................................................................25
Chapter 3
Control-Variables and Control-Programs...................................................... 33
Control-Variables.....................................................................................................33 Control-Groups........................................................................................................35 Control-Expressions ................................................................................................36 Control-Assignments ..............................................................................................37 Control-Programs ....................................................................................................38 Writing Pragma Directives.....................................................................................39
Apogee User's Manual Page 3
Apogee Software, Inc.
Chapter 4
Control-Variable Definitions ........................................................................... 41
Optimization Control-Variables............................................................................ 41 Introduction to Optimization......................................................................... 41 Control-Variable alias -- Alias Analysis ...................................................... 43 Control-Variable callmod -- Call Modification Analysis .......................... 44 Control-Variable cih -- Cross-Iteration Hoisting........................................ 45 Control-Variable constp -- Constant Propagation...................................... 45 Control-Variable copyp -- Copy Propagation............................................. 46 Control-Variable domain -- Optimization Domain ................................... 46 Control-Variable fcm -- Forward Code Motion.......................................... 46 Control-Variable flex -- Optimization Flexibility ....................................... 47 Control-Variable flow -- Control Flow Optimization................................ 47 Control-Variable fltacc -- Floating Point Expression Rearrangement & Numerical Accuracy................................................................................. 48 Control-Variable fltedge -- Floating Point Limits ...................................... 49 Control-Variable fltfold -- Floating Point Constant Folding .................... 50 Control-Variable intedge -- Integer Limits.................................................. 50 Control-Variable ivrep -- Induction Variable Replacement...................... 50 Control-Variable memlimit -- Scope of Main Optimizations ................... 51 Control-Variable mopt -- Main Optimizations........................................... 51 Control-Variable reg -- Register Allocation ................................................ 52 Control-Variable safeintr -- Intrinsic Error Checking................................ 53 Control-Variable sched -- Scheduling.......................................................... 53 Control-Variable unroll -- Loop Unrolling.................................................. 54 Control-Variable unrollexact -- Loop Unrolling Exactness ...................... 54 Control-Variable whole -- Whole Program Compilation.......................... 55 Control-Variable xopt -- Extra Optimizations ............................................ 55 Control-Variable zone -- Expansion of Zones............................................. 56 Control-Variables inline, noinline, deflib, inllev and sinllev -- Routine Inlining ....................................................................................................... 56 Control-Variables profile and pstat -- Profiling Feedback to Inlining .... 58 Control-Group O -- Optimization ................................................................ 59 Target Computer Control-Variables ..................................................................... 59 Control-Variable cg -- Target Computer Instruction Set ........................... 60 Control-Variable pipe -- Target Computer Instruction Pipeline .............. 61 Control-Group T -- Target Computer .......................................................... 62 Diagnostic Control-Variables ................................................................................ 62 Control-Variable diag -- Diagnostic Output Level .................................... 63 Control-Variable quit -- Diagnostic Quit Level .......................................... 64 Control-Variable stddiag -- Standard Diagnostics (FORTRAN only)..... 64 FORTRAN Source File Format.............................................................................. 64 FORTRAN 77 Statement Format ................................................................... 64 Control-Variable fblank -- FORTRAN Statement Blanks.......................... 66 Control-Variable fcols -- FORTRAN Statement Columns ........................ 66
Page 4 Apogee User's Manual
Table of Contents
Control-Variable ftab -- FORTRAN Tab Statements.................................. 66 Control-Group F -- FORTRAN Statement Format..................................... 67 Control-Variable fcont -- FORTRAN Continuation Lines ........................ 68 Control-Variable fstmt -- FORTRAN Statement Buffer............................. 68 Control-Variable case -- FORTRAN Case Sensitivity ................................ 69 Control-Variable dline -- FORTRAN Debug Lines .................................... 69 Fortran 90 Statement Format.......................................................................... 69 Control-Variable sform -- FORTRAN 90 Statement Format..................... 70 FORTRAN 77 Compilation.................................................................................... 70 Control-Variable alnstd -- FORTRAN Standard Common/Equivalent Layout ........................................................................................................ 70 Control-Variable cmul -- Complex multiply............................................... 72 Control-Variable comname -- COMMON Block Name Format .............. 72 Control-Variable ftype -- FORTRAN Types................................................ 73 Control-Variable implicit -- Assumed Implicit None Statement ............. 76 Control-Variable onetrip -- One-Trip DO Loops in FORTRAN ............... 76 Control-Variable save -- SAVE Variables in FORTRAN............................ 77 Control-Variable vms -- VAX/VMS Compatibility ................................... 80 C/C++ Compilation ............................................................................................... 81 Control-Variable c -- C/C++ Language Modes.......................................... 81 Control-Variable char -- Signedness of plain char in C/C++................... 83 Control-Variables sizet and wchart -- Definitions of types size_t and wchar_t in C/C++ .................................................................................... 84 Control-Variable fltdbl -- Single vs. Double Arithmetic ........................... 85 Control-Variable inclpath -- Include File Searching .................................. 85 Control-Variable join -- Combining Programs ........................................... 86 C++ Compilation..................................................................................................... 87 C++ Dialect ....................................................................................................... 87 Control-Variable tmpl -- Template Instantiation Mode in C++ ............... 87 General Code Control............................................................................................. 90 Control-Variable addr -- Data Addressing Mode ...................................... 90 Control-Variable alnref -- Alignment of Indirect References ................... 90 Control-Variable bss -- Use of .bss section .................................................. 92 Control-Variable flat -- Flat Register Model ............................................... 92 Control-Variable fltconst -- Single Precision Floating Point Constants .. 93 Control-Variable g -- Symbolic Debugging ................................................ 95 Control-Variable glbreg -- Use of Global Registers in Compiled Code .. 95 Control-Variable kap -- Use of the KAP Preprocessor .............................. 96 Control-Variable prof -- Profiling ................................................................. 97 Control-Variable relfunc -- Routine Handling in Assembly Files ........... 97 Control-Variable vast -- Use of the VAST Preprocessor ............................ 98 Properties of Variables............................................................................................ 98 Control-Variables volatile, defvol, ptrvol -- Volatile Variables ................ 98 Miscellaneous Controls .......................................................................................... 99
Apogee User's Manual Page 5
Apogee Softwar ...