Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!rutgers!pyrnj!mirror!ima!johnl From: mcintyre@artecon.artecon.UUCP (C. Kevin Mcintyre) Newsgroups: mod.compilers Subject: Peephole optimizations Message-ID: <373@artecon.artecon.UUCP> Date: Fri, 6-Mar-87 17:39:48 EST Article-I.D.: artecon.373 Posted: Fri Mar 6 17:39:48 1987 Date-Received: Wed, 11-Mar-87 04:03:48 EST Sender: johnl@ima.UUCP Reply-To: mcintyre@artecon.UUCP () Organization: artecon Lines: 18 Approved: compilers@ima.UUCP I am looking for some source/suggestions/clues/etc... (whatever) for Peephole Optimizers. I have looked at the Aho Dragon book but it is somewhat lacking in this area. As far as I can tell it is just a matter of "string" matching and replacement. I am especially interested in how the "big" compiler writing companies do their peephole optimizing if any of them read this newsgroup. Any help will be greatly appreciated and I will post the results/suggestions back to the net if the interest is great enough. --Thanks, Kevin. Reply with any information to uucp path sdcsvax!hp-sdd!artecon!mcintyre [All of the peepholers I ever fooled with were pretty standard pattern matchers with some sort of data structure to let you move code around to do tail merging and loop flipping. It also seems that about half of the peephole transformations are quite machine independent, like removing redundant moves or jumps to jumps, and the other half are completely machine specific, like taking advantage of pecular address modes or loop closing instructions. Feel free to cc: interesting responses to compilers. -John] -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | cca}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request