Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!spdcc!ima!esegue!compilers-sender From: larus@primost.cs.wisc.edu (James Larus) Newsgroups: comp.compilers Subject: Re: Intermediate Representation Keywords: code, optimize Message-ID: <1990Aug12.134822.10054@esegue.segue.boston.ma.us> Date: 12 Aug 90 13:48:22 GMT References: <1990Aug07.153407.8877@esegue.segue.boston.ma.us> Sender: compilers-sender@esegue.segue.boston.ma.us Reply-To: larus@primost.cs.wisc.edu (James Larus) Organization: U of Wisconsin CS Dept Lines: 19 Approved: compilers@esegue.segue.boston.ma.us In my opinion (a phrase sadly missing from other replies to this message), both RTL and AST/DAG representations are equivalent for a compiler designed and written for a single machine. I base this belief on having written or worked on compilers that use both types of IR. Both forms represent the program in a form that is easy to traverse and manipulate. However, I don't believe that the equivalence holds for retargetable compilers. RTL appears to be a much better IR for retargetable code generators. The Davidson-Fraser approach produces fast, practical code generators while the retargetable CG for ASTs are still mainly university projects. A more interesting question is: how would you demonstrate that one approach is superior to the other one? If computer science was a science, we could just lock up a sample of programmers in a room and have them write a compiler of a randomly-choosen type and compare the final products. /Jim -- Send compilers articles to compilers@esegue.segue.boston.ma.us {spdcc | ima | lotus| world}!esegue. Meta-mail to compilers-request@esegue.