Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!mintaka!spdcc!iecc!compilers-sender From: lupine!rfg@uunet.UU.NET (Ron Guilmette) Newsgroups: comp.compilers Subject: Re: Stack formats and Code folding from JSR/RTS -> {Local} Keywords: optimize, architecture Message-ID: <5425@lupine.NCD.COM> Date: 7 May 91 06:28:42 GMT References: <9104262025.AA21840@enuxva.eas.asu.edu> <7524@ecs.soton.ac.uk> <1991May1.035622.25021@daffy.cs.wisc.edu> Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: lupine!rfg@uunet.UU.NET (Ron Guilmette) Organization: Network Computing Devices, Inc., Mt. View, CA Lines: 27 Approved: compilers@iecc.cambridge.ma.us In article <1991May1.035622.25021@daffy.cs.wisc.edu> carter@cs.wisc.edu (Gregory Carter) writes: >Hello... > >I don't know if this is incredibly obvious or what, but in the OLDEN DAYS >when I was working on a 6502 machine. Speed was of the upmost...ad nauseum.. > >What I want to know, if any of you have considered, for high speed applications >to get that extra push, what the problems would be in compiler design to: > >1) Transcribe all local variables to global ones. For certain machines which do not efficiently support stacks, it may be useful (for C and C++) to declare formal parameter variables as storage class `static'. There's only one problem. Neither C nor C++ allow formal parameters to be declared `static'. (Note however that C and C++ allow formal parameters to be declared as `register'.) I have recently noted this apparent language shortcomming the x3j16 (the ANSI C++ Standardization Committee), however there seems to be little (if any) interest in adding such a feature to C++. -- // Ron ("Loose Cannon") Guilmette // Internet: rfg@ncd.com uucp: ...uunet!lupine!rfg -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.