Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!glacier!mips!mash From: mash@mips.UUCP (John Mashey) Newsgroups: net.arch Subject: Re: Addressing modes Message-ID: <389@mips.UUCP> Date: Tue, 11-Mar-86 03:46:50 EST Article-I.D.: mips.389 Posted: Tue Mar 11 03:46:50 1986 Date-Received: Thu, 13-Mar-86 07:38:31 EST References: <946@garfield.UUCP> <1417@sdcsvax.UUCP> Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 47 Peter Ludemann ludemann@ubc-cs.uucp (ubc-vision!ubc-cs!ludemann) writes: > In article <1163@mmintl.UUCP> franka@mmintl.UUCP (Frank Adams) writes: > >In article <169@ubc-cs.UUCP> ludemann@ubc-cs.UUCP (Peter Ludemann) writes: > >>As far as I'm concerned, the test for RISCness should be: given any > >>piece of source code, is there only one reasonable code sequence which can be > >>output by the compiler? > > > >This is not a possible objective. Consider sequences like: > > (description of optimisations possible) > > You miss my point. The optimisations described (in this case common > expression detection) are possible *regardless* of the target > machine's architecture. Any good compiler should try to optimise > code like this. However, once these "source level" and flow analysis > optimisations are finished, there should be only one reasonable way > of generating the machine code. Otherwise, the poor compiler writer > has to do another set of optimisation analyses, all because of the > target machine's instruction set. One more time: I urge people not to propose metrics that are exceedingly difficult to measure or comprehend or even define. As I said before, I'm not sure "RISCness" is something one necessarily wants to measure as a goal, in place of things that one really cares about like performance, price/performance, code size, etc, etc. However, if one wants to measure it, for whatever reason, PLEASE a) Use cycles/MIPS (normalized to some common unit of work), i.e., try: cycles/MIPS = (clock rate in Mhz) / (MIPS rating) so that, for example, if you think a VAX 11/780 with UNIX is a 1 Mips cpu, at 5Mhz, it gets a 5. If you think a good 68020 implementation is twice as fast, then it gets 16.67/2 = 8.33, etc. [Notice that this isn't cycles/instruction, but cycles/equivalent work.] OR b) Propose a different metric that has a reasonable way to measure it. Is it unreasonable to ask for an algorithm to compute the metric? [I suggest that the "only one way to do it" test is, in general, mechanically undecidable.] (Note: Peter's comment does get at something that usually happens, which is that simpler machines have less different obvious code selection possibilities at some level or other, but even then, there are almost always time-space tradeoffs to be made, which allow for different code sequences for even the RISCiest of machines.) -- -john mashey UUCP: {decvax,ucbvax,ihnp4}!decwrl!mips!mash DDD: 408-720-1700 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086