N V Krishna <[EMAIL PROTECTED]> 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