🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #11296

Re: No Last Call Optimization on Sparc and DECstation

#11296
From: Randell Jesup
Date: Sat, 02 Jan 1993 03:16
24 lines
1481 bytes
bmtong@cs.cuhk.hk (Tong Bo-Ming) writes:
>In the field of Logic Programming, we have a kind of optimization
>technique called the Last Call Optimization.  The idea is simple.
...
>In the above procedure, we may discard the current stack frame (or reg
>window in Sparc) before calling z.  We then replace the call z
>instruction by a jump instruction.
...
>In the above kind of procedure where there is only one call, no stack
>frame is necessary.  It can be optimized as if it were a leaf procedure.
>
>It is a sad thing to notice that such a nice optimization is not
>implemented in languages other than Prolog and on RISC architectures.

	I think you need to look at more compilers.  The SAS/C 680x0
compiler for the Amiga does both of these.

-- 
GNU Emacs is a LISP operating system disguised as a word processor.
 - Doug Mohney, in comp.arch

Randell Jesup, Jack-of-quite-a-few-trades, Commodore Engineering.
jesup@cbmvax.commodore.com  BIX: rjesup  
Disclaimer: Nothing I say is anything other than my personal opinion.
Technical Details
Message-ID: <38249@cbmvax.commodore.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!cs.utexas.edu!rutgers!cbmvax!jesup
References: <1992Dec30.094352.4243@cucs5.cs.cuhk.hk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!cs.utexas.edu!rutgers!cbmvax!jesup
From: jesup@cbmvax.commodore.com (Randell Jesup)
Newsgroups: comp.arch
Subject: Re: No Last Call Optimization on Sparc and DECstation
Message-ID: <38249@cbmvax.commodore.com>
Date: 2 Jan 93 03:16:53 GMT
References: <1992Dec30.094352.4243@cucs5.cs.cuhk.hk>
Reply-To: jesup@cbmvax.commodore.com (Randell Jesup)
Organization: Commodore, West Chester, PA
Lines: 24