Answer to McCalpins f77 inquiry
Calvin H. Vu
calvin at dinkum.SGI.COM
Wed Oct 26 05:33:49 AEST 1988
I feel obligated to answer to your questions since I am one of the people
working on the MIPS compiler at SGI. I think your questions are general
enough to warrant a posting of our response. So here it goes:
<< 1. Does the MIPS compiler support array bounds checking? f77 -C
Yes, by using the -C option.
<< 2. Does the MIPS compiler support execution-time profiling? f77 -pg
Yes, by using -p option. You can also use pixie(1) which does not
require any special compilation option. By using pixie(1) and
prof(1), you can get basic block counting which provides you with
profiling information in the following areas:
o Time spent per procedure.
o Execution time on a per line basis.
o Invocation counts per procedure. Tells how many
times a procedure is called and from which procedures
that reference the procedure.
o Procedures which were never executed.
o Lines of code which were never executed.
<< 3. Does the MIPS compiler have a RELIABLE interface to dbx?
We have incorporated a lot of enhancements and bug fixes into the basic
MIPS dbx package. It IS RELIABLE (as of the 3.1 release, anyway)
and does not have any of the problems you mentioned nor any
semi-significant problems that we know of.
We have added a 'dbx' user interface, called 'edge', which displays 3
windows (for dbx commands, source code, and program outputs) and
accepts inputs from a mouse.
<< 4. Does the MIPS compiler have argument checking in its intrinsic
<< function libraries?
Yes, it has argument checking for intrinsic functions and none of our
customers have found any problems with that. At one time, Prime made
a request to make the compiler less restrictive in checking intrinsic
argument types and we have added that enhancement to the compiler.
I don't know of any existing bugs in the intrinsic function library.
<< 5. Does the MIPS compiler actually support CORRECT IEEE arithmetic?
<< (including rounding, sufficient guard bits, and robust
<< intrinsics)
Sorry I don't have the answer for this. As far as I know, we pass
all the official QA tests, including GSA, ANSYS, SDRC, and the NAG
floating point verification suite. We just implemented floating-point
trap handling in response to the only request regarding floating-
point operations we received from our customers.
<< 6. Does the MIPS compiler have a good optimizer?
The MIPS f77 compiler provides four levels of optimization which
include:
o cross-compilation-unit global optimization
o loop-invariant code
o loop-induction expression
o automatic prioritized register allocation
o delayed-branch optimization
o common subexpression, dead-code removal
o constant folding
Those are the ones I can recall off hand. If you need further details
I would be glad to provide a list of all the public literature
pulished on the MIPS optimizer.
The Linpack benchmark can give a general idea of quality of
optimization. Linpack results are quoted as Fortran-BLAS and coded-BLAS
where coded-BLAS is assembly level coding of the low level algebra
routines. The Linpack numbers for a 4D70 are :
fortran single precision : 2.03 MFLOPS
double precision : 0.94 MFLOPS
assembly single precision : 2.39 MFLOPS
double precision : 1.04 MFLOPS
As you can see the difference between assembly and Fortran is about
10%. This ratio indicates that our compilers are mature. We are,
however, constantly trying to improve this.
Also, to Mr. Knobi's replies to your inquiry, I would like to add these points:
<< it is a true F77-standard implementation. Don't look for "VAX" extensions,
<< but if a program runs on that machine, its runs everywhere.
As of release 3.1 of the FORTRAN compiler, we have included many
VAX/VMS FORTRAN enhancements in the compiler. It is now
functionally compatible with VMS FORTRAN and allows easy porting
of most VMS FORTRAN programs to our system.
<< if you rely on local variables to be saved across calls, you have to insert
<< SAVE statements (as described in the standard). Unfortunately there is no
<< compiler switch to do that for you automatically (f77/3100 had one).
The 4D series also allows the '-static' option to do just that.
<< The compiler (and the whole 4D machine) react angrily on wrong parameter
<< lists (number and type).
We have enhanced the compiler to be more lenient in checking argument
types in intrinsic function calls.
Calvin Vu
calvin at sgi.com
More information about the Comp.sys.sgi
mailing list