What ideas are better for assigning registers to terminals?

"Bill A." <bill@megahits.com>
16 Sep 1999 02:01:53 -0400

          From comp.compilers

Related articles
What ideas are better for assigning registers to terminals? bill@megahits.com (Bill A.) (1999-09-16)
Re: What ideas are better for assigning registers to terminals? torbenm@diku.dk (Torben Mogensen) (1999-09-20)
Re: What ideas are better for assigning registers to terminals? johnmce@world.std.com (1999-09-20)
Re: What ideas are better for assigning registers to terminals? bergner@lcse.umn.edu (Peter Bergner) (1999-10-06)
Re: What ideas are better for assigning registers to terminals? andi@complang.tuwien.ac.at (1999-10-06)
Re: What ideas are better for assigning registers to terminals? bfranchuk@jetnet.ab.ca (Ben Franchuk) (1999-10-11)
Re: What ideas are better for assigning registers to terminals? max@gac.edu (Max Hailperin) (1999-10-11)
| List of all articles for this month |

From: "Bill A." <bill@megahits.com>
Newsgroups: comp.compilers
Date: 16 Sep 1999 02:01:53 -0400
Organization: Compilers Central
Keywords: registers, optimize

Hello. I know there is no right answer to this and there's room for
debate, but I'd like your opinions on the following dilemma, and which
case here is perhaps a better approach to use (or is there a third
I've not considered?):


Assume an intermediate representation coded as a tree or dag. If an
operator at a node must use a specific processor register to calculate
the result, is it better to:


1. Traverse the tree and pre-assign these registers, then globally
allocate registers using these fixed ones as predetermined and
unchangeable, or


2. Globally allocate across the function and add register copies to
satisfy the requirements of the operators needing specific registers
(which implies possibly having to spill a globally allocated one to
free it for use by the operator).


Thank you in advance if you have any ideas.


Bill Auerbach


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.