Related articles |
---|
Parameter Passing Via Registers lins@apple.com (Chuck Lins) (1991-04-29) |
Re: Parameter Passing Via Registers preston@ariel.rice.edu (1991-04-30) |
Re: Parameter Passing Via Registers mike@taumet.com (1991-04-30) |
Re: Parameter Passing Via Registers zlsiial@cms.manchester-computing-centre.ac.uk (A. V. Le Blanc) (1991-04-30) |
Re: Parameter Passing Via Registers mike@yalla.tuwien.ac.at (1991-04-30) |
Re: Parameter Passing Via Registers ram+@cs.cmu.edu (Rob MacLachlan) (1991-05-01) |
Re: Parameter Passing Via Registers mauney@eos.ncsu.edu (1991-05-02) |
Re: Parameter Passing Via Registers mike@vlsivie.tuwien.ac.at (1991-04-30) |
Re: Parameter Passing Via Registers mario@cs.man.ac.uk (Mario Wolczko) (1991-05-02) |
Re: Parameter Passing Via Registers mike@vlsivie.tuwien.ac.at (Michael K. Gschwind) (1991-05-03) |
Re: Parameter Passing Via Registers mauney@eos.ncsu.edu (1991-05-07) |
Newsgroups: | comp.compilers |
From: | Rob MacLachlan <ram+@cs.cmu.edu> |
Keywords: | optimize, registers, Pascal, Lisp |
Organization: | School of Computer Science, Carnegie Mellon |
References: | <1991Apr30.022048.4539@iecc.cambridge.ma.us> |
Date: | Wed, 1 May 91 02:11:18 GMT |
>Does anyone know how nested procedures affect the ability to pass parameters
>via registers? If there was no up-level access everything would work fine,
>but with this facility you get all sorts of problems.
In "mostly functional" langauges like Lisp and ML, the compiler usually only
forces out to memory variables that may be side-effected. Variables that
are initialized once and then never reassigned don't cause any problems,
since the value can be freely copied.
>Uplevel access would also seem to affect dataflow analysis (the compiler
>could think that a variable is 'dead' when in reality it's going to get
>accessed by a nested local procedure.
A common approach is to find all variables that may be accessed uplevel by a
particular function, and then pass those values as additional implicit
arguments. This causes the uplevel copy of the variable to be live until
you are done with it.
Robert MacLachlan (ram+@cs.cmu.edu)
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.