Related articles |
---|
how to generate code for (a,b):=(b,a) anton@mips.complang.tuwien.ac.at (1997-05-05) |
Re: how to generate code for (a,b):=(b,a) chase@world.std.com (David Chase) (1997-05-08) |
how to generate code for (a,b):=(b,a) Dave@occl-cam.demon.co.uk (Dave Lloyd) (1997-05-08) |
Re: how to generate code for (a,b):=(b,a) bart@time.cirl.uoregon.edu (1997-05-08) |
Re: how to generate code for (a,b):=(b,a) Robert.Harley@inria.fr (1997-05-08) |
Re: how to generate code for (a,b):=(b,a) dlmoore@ix.netcom.com (David L Moore) (1997-05-08) |
Re: how to generate code for (a,b):=(b,a) preston@cs.rice.edu (1997-05-08) |
Re: how to generate code for (a,b):=(b,a) cliffc@risc.sps.mot.com (Cliff Click) (1997-05-12) |
Re: how to generate code for (a,b):=(b,a) wilson@cs.utexas.edu (1997-05-12) |
Re: how to generate code for (a,b):=(b,a) tim@wfn-shop.Princeton.EDU (1997-05-13) |
Re: how to generate code for (a,b):=(b,a) cdg@nullstone.com (Christopher Glaeser) (1997-05-13) |
Re: how to generate code for (a,b):=(b,a) genew@vip.net (1997-05-13) |
Re: how to generate code for (a,b):=(b,a) bobduff@world.std.com (1997-05-13) |
[11 later articles] |
From: | preston@cs.rice.edu (Preston Briggs) |
Newsgroups: | comp.compilers |
Date: | 8 May 1997 21:49:00 -0400 |
Organization: | Rice University |
References: | 97-05-058 |
Keywords: | code, optimize |
Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>In a code generator we have a problem of moving the contents of
>several registers to other registers, as if the copies happened
>simultaneously. This is equivalent to the problem of recoding the
>multi-assignment
>
>(a1, a2, a3, ...) := (b1, b2, b3, ...)
>
>into simple assignments, where the bs are not necessarily different
>from as or other bs (but ai<>aj for i<>j).
My approach would be to trust the register allocator to get it right.
For instance, in Chaitin's allocator, he has a "coalescing" phase
which is devoted to getting rid of register-register copies. I
especially like this approach since you're going to be doing register
allocation anyway.
You might also check the paper
Register allocation using lazy saves, eager restores, and
greedy shuffling
Burger, Waddell, Dybvig
PLDI, 1995
page 130
The "greedy shuffling" paprt is what you're interested in.
Preston Briggs
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.