Introduction

About This Guide

This guide describes how to use IRIS Power C. It is written for software programmers/developers who want to make efficient use of the IRIX multiprocessors to execute code in parallel. This guide assumes that you understand how multiprocessors work and have a working knowledge of parallel programming.

For resources on parallel programming, see “Reference Material” in this introduction.

What Is IRIS Power C?

IRIS Power C is a C compiler that automatically analyzes sequential code to determine where loops can run in parallel and then generates object code that can use multiple processors. It enables you to recompile existing serial C programs so that they run efficiently on multiprocessor computers without time-consuming hand recoding. Consequently, your original programs remain portable; you don't have to be concerned about the specifics of the system.

What Is the IRIS Power C Analyzer?

The IRIS Power C Analyzer (PCA) is a C code optimization preprocessor that detects potential parallelism in C code. PCA can insert explicit compiler directives that allow the data-independent code to run in parallel. You can use PCA with the C compiler or as a standalone product. Preparing code to run parallel (concurrentization) is not the only way PCA can improve the performance of your code. PCA optimizations include:

  • Concurrentization

  • Local variable identification

  • Sum, dot-product, MAX and MIN reduction recognition

  • Loop reordering

  • Loop unrolling

  • Induction variable recognition

  • Global forward substitution

  • Variable lifetime analysis

  • Dead-code elimination

  • Procedure in-lining

  • Memory management

PCA's conversion process is designed to operate effectively without your intervention. You can send PCA-generated code directly to the compiler. In this sense, PCA is more a part of the compilation process than a standalone tool.

Document Overview

This guide contains the following chapters and appendices:

Chapter 1, “Compiling with IRIS Power C,” explains the command-line options to use at analysis time to alter PCA defaults, such as instructing PCA to set optimization levels or enable/disable a feature.

Chapter 2, “How to Use IRIS Power C,” describes how to compile programs with Power C, interpret the PCA listing files, and use Power C to run programs in parallel.

Chapter 3, “PCA Command-Line Options,” details the options to use to customize output, such as limiting the depth of an in-line expansion.

Chapter 4, “Power C Analyzer Directives,” explains directives that give PCA additional information (about the input program) that PCA cannot determine.

Chapter 5, “Multiprocessing C Compiler Directives,” describes how to use the multiprocessor C compiler to produce code that can run concurrently.

Chapter 6, “PCA Transformations,” offers examples of PCA transformations of ordinary C code into explicit parallel syntax.

Chapter 7, “In-lining and Interprocedural Analysis,” explains command-line options and in-line pragmas you can use to in-line functions or to perform Inter-procedural Analysis.

Chapter 8, “The PCA Listing,” describes PCA's listings and messages to users.

Appendix A, “Improving PCA Performance,” lists suggestions to use when customizing PCA for a particular program.

Appendix B, “Data-Dependence Analysis,” describes data dependence analysis and explains how PCA uses this information to determine if a given loop can run safely in parallel.

Appendix C, “Run Time Environment Variables,” describes the run time options available to control execution of your code.

Related Documentation

The following Silicon Graphics® documents contain information relevant to Power C:

  • C Language Reference Manual, Mountain View, California, Silicon Graphics, Inc., 1995, (part number 007-0701-nnn) documents the syntax and semantics of the C programming language as implemented on the IRIS-4D Series workstations. It documents previous releases of the Silicon Graphics C compilers as well as the ANSI C compiler.

  • C++ Programmer's Guide, Mountain View, California, Silicon Graphics, Inc., 1995, (part number 007-0704-nnn) describes how to use the Silicon Graphics C++ compiler environment. It discusses the two native C++ compilers for producing 32- and n32/64-bit objects, respectively.

  • Reference pages for Power C. For information on Power C, see the pca(1) reference page. For information about multiprocessing, see the mpc(1) reference page. mpc is a source-to-source C translator that transforms code containing parallel directives, inserted by pca or by hand, into parallel C code containing calls to the C multiprocessing library.

Reference Material

Parallel Programming

  • Introduction to Parallel Programming, Steven Brawer, San Diego, California, Academic Press, Inc., 1989 (ISBN 0-12-128470-0), describes general parallel programming concepts. Although the examples are in FORTRAN, most of the concepts described also relate to Power C.

  • Topics in IRIX Programming, Mountain View, California, Silicon Graphics, Inc., 1989, (part number 007-2478-nnn) documents models of parallel computation as implemented on Silicon Graphics multiprocessor computer systems.

Data Dependence

  • Advanced Compiler Optimization for Supercomputers, David Padua and Michael Wolfe, Communications of the ACM, Volume 29, No. 12, December 1986.

  • Data Dependence and Its Application to Parallel Processing, Michael Wolfe and Utpal Banerjee, International Journal of Parallel Programming, Volume 16, No. 2, April 1988.

  • Optimizing Supercompilers for Supercomputers, Michael Wolfe, Ph.D. Thesis, Department of Computer Science, Report No. 82-1009, University of Illinois, Urbana, Illinois, October, 1982.

Style Conventions

The conventions used in the guide help make information easy to access and understand. The following list defines the notation and syntax conventions:

italic 

Indicates arguments in a command line that you must replace with a valid value. In text it is used to indicate commands, document titles, file names, glossary items, new terms, and variables.

courier 

Indicates computer output and program listings.

courier bold 

Indicates computer input and non-printing keys.

[ ] 

Brackets enclose optional command arguments. Do not enter the brackets.

. . . 

An ellipsis indicates that the preceding optional items can appear more than once in succession.

( )  

Parentheses enclose items. Enter them exactly as shown.

{ } 

Braces enclose items from which you must select exactly one. Do not enter the braces.

| 

The vertical bar separates items from which you can choose one.

For example,

–optimize=integer

means that for the optimize option, you must substitute an integer representing the level of optimization you want, such as

–optimize=2

This guide uses lowercase letters for PCA command-line options; command-line options are not case sensitive. File name parameters, however, are case sensitive.