|Register Allocation and Aliasing in C email@example.com (Atanas Rountev) (1998-07-20)|
|Re: Register Allocation and Aliasing in C firstname.lastname@example.org (1998-07-21)|
|From:||email@example.com (Bob Morgan)|
|Date:||21 Jul 1998 11:08:17 -0400|
|Organization:||Digital Equipment Corporation|
|Keywords:||C, registers, analysis|
On 20 Jul 1998 17:02:08 -0400, Atanas Rountev <firstname.lastname@example.org>
>I am trying to evaluate the benefits of precise and expensive alias
>analysis for C in terms of the impact it has on register allocation. I
>am having a hard time finding papers that describe how people deal
>with register allocation for C with its unrestricted use of pointers.
>Most of the papers I've seen are FORTRAN oriented and the aliasing
>issues there are different from the ones for C.
The answer to your question depends on the structure of your compiler.
Many optimizing compilers have decided which values are candidates for
allocation to registers earlier in the compiler. For example, a
compiler that creates quadruples (or some similar concept) is
implicitly saying "These are the things that can be placed in
registers". With this structure the alias information is used during
global optimization to decide on the position of instructions that
load and store values.
The register allocator does not move computations, it assigns the
registers and fixes up the problems when too many registers are
needed. It doesn't need the alias information.
If the compiler mixes some aspects of global optimization and register
allocation then alias information may be needed. This is not a
language related issue, except global optimization is harder with C
than with Fortran.
Return to the
Search the comp.compilers archives again.