Path: utzoo!bnr-vpa!bnr-fos!bnr-public!schow From: schow@bnr-public.uucp (Stanley Chow) Newsgroups: comp.arch Subject: Re: RISC is NOT micro-code (was Re: Compiling - RISC vs. CISC Message-ID: <756@bnr-fos.UUCP> Date: 17 Jul 89 15:21:37 GMT References: <12233@pur-ee.UUCP> <753@bnr-fos.UUCP> <1989Jul17.035238.6497@utzoo.uucp> Sender: news@bnr-fos.UUCP Reply-To: schow%BNR.CA.bitnet@relay.cs.net (Stanley Chow) Organization: Bell-Northern Research, Ottawa, Canada Lines: 48 Summary: Followup-To: Keywords: In article <1989Jul17.035238.6497@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: >In article <753@bnr-fos.UUCP> schow%BNR.CA.bitnet@relay.cs.net (Stanley Chow) writes: >> 4) RISC has more opportunaty for optimizations ... This means >> the compiler is much harder to get right... > >No, it means it is harder to get optimal. There's a difference between >generating suboptimal code and generating wrong code. Truly well-built >compilers (obviously the semantics of "well-built" here are somewhat a >matter of opinion) do much optimization by applying transformations that >are *hoped* to improve the code but are *known* to preserve semantics. >Such compilers may not always generate the fastest code but will seldom >generate wrong code. > >Incidentally, do you really think the greater complexity of CISC >instruction sets makes CISC compilers *easier* to get right? The >compiler, if nobody else, has to know all the gory details of the >machine if it's really pushing for good code quality. >-- Henry (and other posters) quite correctly pointed out the mistake in my statment. What I meant to say is: a) RISC "needs" more optimization in compiler (to achive the "same" degree of "optimality") b) Therefore, in *minimal* (meaning compilers with barely enough brains to get acceptable results) compilers, the RISC compiler will tend to have more and fancier optimizations. c) Therefore, in minimal compilers, the RISC compiler will tend to be less reliable. Obviously, the "native" complexity of a CPU will have substantial impact on the complexity and reliability of the compiler. As other posters have pointed out, CISC doees not *necessarily* mean a complex CPU. CISC can be very regular and simple to use, especially if you don't attempt to optimize in the compiler. I am by no means saying that *all* CISC machines lend themself to a nice simple reliable compiler. I *am* saying that CISC is just as likely to *allow* such a compiler. It all depends on the actual complexity of the machine, not whether it is RISC or CISC. Incidentally, I agree that truly optimal compilers are much harder for complex machines. I will even agree that most of the "classical" machines are not nice machines for optimizing compilers. Stanley Chow BitNet: schow@BNR.CA BNR UUCP: ..!psuvax1!BNR.CA.bitnet!schow (613) 763-2831 ..!utgpu!bnr-vpa!bnr-fos!schow%bnr-public Me? Represent other people? Don't make them laugh so hard.