This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A newbie question: Maping pseudos to declaration.
- From: Ian Lance Taylor <ian at airs dot com>
- To: N V Krishna <nvk at cs dot ucla dot edu>
- Cc: gcc at gnu dot org
- Date: 28 May 2005 22:21:06 -0400
- Subject: Re: A newbie question: Maping pseudos to declaration.
- References: <Pine.OSX.4.58.0505281548270.1471@konark.cs.ucla.edu>
N V Krishna <nvk@cs.ucla.edu> writes:
> I am trying to do some modifications to the register allocator and for the
> architecture I am dealing with, I want to handle different type of pseudos
> differently. All local scalars fall under one group, local struct/union
> variables under one group and all globals under one group. Given a pseudo,
> I want to know which group it is being used with.
It's hard to make sense of a strict distinction between local scalars
and local struct/union variables in gcc 4. The SRA optimization means
that struct/union variables will sometimes be handled as a collection
of independent scalar values. See tree-sra.c.
> For some pseudos reg_equiv_memory_loc is returning NULL. And those are the
> cases that are causing me to thing otherwise.
This will happen for a local variable which has not been spilled onto
the stack, and is thus always held in registers (this could be either
a scalar variable or a struct/union variable). It will also happen
for pseudos which hold sufficiently simple constant values--see the
reg_equiv_constant array.
Ian