home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!yktnews!prener
- From: prener@watson.ibm.com (Dan Prener)
- Subject: Re: xlf compiler preprocessors
- Sender: news@watson.ibm.com (NNTP News Poster)
- Message-ID: <PRENER.92Jul25200112@prener.watson.ibm.com>
- In-Reply-To: alhy@unixhub.slac.stanford.edu's message of 25 Jul 92 12:11:34 GMT
- Date: Sun, 26 Jul 1992 01:01:12 GMT
- Disclaimer: This posting represents the poster's views, not necessarily those of IBM
- References: <4840@unixhub.SLAC.Stanford.EDU>
- Nntp-Posting-Host: prener.watson.ibm.com
- Organization: IBM T.J. Watson Research Center, Hawthorne, New York
- Followup-To: comp.unix.aix
- Lines: 31
-
- In article <4840@unixhub.SLAC.Stanford.EDU> alhy@unixhub.slac.stanford.edu (J. Scott Berg) writes:
-
- >Can anyone explain to me why/when/if I should use the -Pk or -Pv
- >preprocessors instead of/in addition to the -O optimization? I have
- >some fortran code (LAPACK, in particular) that I want to optimize for
- >speed. The manual makes it rather unclear what exactly -O does, so I
- >can't figure out if -Pk and/or -Pv do more or less optimization
- >("There may be other optimizations performed also" is written after a
- >list that is headed with "The OPT option performs some of the
- >optimization techniques outlined below"). Thanks
-
- The preprocessors are exactly that: PREprocessors, performing a variety
- of source-to-source transformations. When you use one of them, you should
- definitely also use -O. As to whether one of the preprocessors will get
- you performance better than that obtained using only -O, the best approach
- is to try it and time your program.
-
- The -O option will perform such general-purpose optimizations as
- common-subexpression elimination, strength reduction, elimination of
- computations whose results are never used, dead induction-variable
- elimination, constant propagation, etc., as well as machine-specific
- optimizations such as casting loops in a form that takes advantage of
- the hardware's (usually) zero-time loop terminating instruction,
- instruction scheduling, etc.
-
- The preprocessors will do some of the above and will also do loop
- unrolling, loop interchange, strip mining, replacement of code by
- calls to highly optimized BLAS library routines where appropriate,
- etc.
- --
- Dan Prener (prener@watson.ibm.com)
-