Related articles |
---|
Register Pairs and Coalescing johnmce@world.std.com (1999-07-23) |
From: | johnmce@world.std.com (John McEnerney) |
Newsgroups: | comp.compilers |
Date: | 23 Jul 1999 22:23:04 -0400 |
Organization: | Metrowerks, Inc. |
Keywords: | registers, optimize |
I am currently implementing support for (aligned) Register Pairs a la
Briggs' thesis and have run into an issue that I don't think was
discussed: the interaction between register pairs and coalescing.
For example, let's assume that (real) registers R4 and R5 are used to
implement the calling conventions of some target machine.
COPY R4 <- Rx {Rx is a 64-bit 2-cluster}
CALL foo
COPY R4 <- Ry {Ry is a 32-bit singleton}
COPY R5 <- Rz {Rz is a 32-bit singleton}
CALL bar
Assuming that Rx does not interfere with R4 we can coalesce Rx and R4.
Similarly for Ry. But what about Rz?
If it doesn't interfere with R5 it should be coalesced. But it might
interfere with Rx, and since Rx has been coalesced with R4:R5, it can't be
legal to coalesce Rz with it.
I think this suggests that when adding Rx's interferences to those of R4,
I must also add them to those of R5. Is this sufficient?
--
John McEnerney (mcenerney@metrowerks.com)
Return to the
comp.compilers page.
Search the
comp.compilers archives again.