home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!purdue!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
- From: hrubin@pop.stat.purdue.edu (Herman Rubin)
- Newsgroups: comp.programming
- Subject: Compilers: was: Re: Advantages/disadvantages of macros/inlining?
- Keywords: macro inline
- Message-ID: <54942@mentor.cc.purdue.edu>
- Date: 23 Jul 92 22:33:38 GMT
- References: <1992Jul13.162208.7651@webo.dg.com> <54558@mentor.cc.purdue.edu> <1992Jul22.154647.877@tc.fluke.COM>
- Sender: news@mentor.cc.purdue.edu
- Organization: Purdue University Statistics Department
- Lines: 51
-
- In article <1992Jul22.154647.877@tc.fluke.COM> kurt@tc.fluke.COM (Kurt Guntheroth) writes:
- >hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
-
- >>On the one hand, computer people are stupidly insisting that the
- >>compiler can do all, and that human attempts to improve what compilers
- >>can do are futile. Now we hear the complaint that the compiler will
- >>choke on the problem.
-
- >>On the one hand, we hear that there are lots of registers. On the
- >>other hand, we hear that there are not enough for inlining.
-
- >>Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
-
- >Well, it's all true.
-
- >On a large program, a world-class compiler can do far better than even an
- >experienced programmer at discovering optimizations. I would expect the
- >compiler to win every time on non-toy problems.
-
- The compiler can only do the optimizations is knows about. If the human is
- restricted to such weak things as Fortran or C, a world-class compiler
- would win most of the time. But there are quite a few things which the
- HLLs are unable to do anything reasonable with.
-
- >On some RISC processors, there are virtually unlimited registers; hundreds
- >of them.
-
- One of the people in the computing center here told me that even the
- CISC Cyber 205, with its 256 registers, about 240 useful by the programs,
- sometimes runs out. It also has relatively fast load/store of register
- blocks.
-
- >On the other hand, there are constructs (like inlining) that can make it
- >more difficult for some compilers to do a good job. Are these world class
- >compilers? Maybe and maybe not, but it doesn't rob the truth from the first
- >assertion. The best compilers on the best machines translating appropriate
- >languages can do far better than a human.
-
- >And there are machines with absolutely miserable register sets, and
- >compilers with code generation strategies optimized for machines with many
- >registers often suck big-time on machines with few or difficult-to-use
- >registers.
-
- But the compilers, even the world class ones, are woefully ignorant. Of
- course, the answer is to let the human instruct the compiler, and the
- instruction may have to be to try out this large variety of procedures.
- --
- Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
- Phone: (317)494-6054
- hrubin@pop.stat.purdue.edu (Internet, bitnet)
- {purdue,pur-ee}!pop.stat!hrubin(UUCP)
-