Xref: utzoo comp.arch:8459 comp.lang.misc:2696 comp.lang.c:16566 Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cwjcc!ukma!gatech!bloom-beacon!mit-eddie!fenchurch!jbs From: jbs@fenchurch.mit.edu (Jeff Siegal) Newsgroups: comp.arch,comp.lang.misc,comp.lang.c Subject: Re: Peephole optimisation Message-ID: <11201@eddie.MIT.EDU> Date: 27 Feb 89 19:16:20 GMT References: <740@tetons.UUCP> <76700068@p.cs.uiuc.edu> <671@oracle.oracle.com> <730@microsoft.UUCP> <1153@l.cc.purdue.edu> <8650@aw.sei.cmu.edu> Sender: uucp@eddie.MIT.EDU Reply-To: jbs@fenchurch.UUCP (Jeff Siegal) Organization: MIT, EE/CS Computer Facilities, Cambridge, MA Lines: 19 >cik@l.cc.purdue.edu (Herman Rubin) writes: > > [...]And how big is the peephole? Every study I've seen claims that three instructions is very nearly always sufficient. The exception being very complex instructions which might be recognized as a substitution for a long sequence of simple instructions. In reality, the long sequence of simple instructions is very unlikely to *exactly* match the complex instruction anyway, so the very long peephole would almost never be of value. For RISC machines, this is not likely to be an issue, and three instructions would (probably) suffice. Multiple passes can often be used to get the same effect as a longer peephole (by using intermediate transformations). Jeff Siegal