Hello All,
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.

Any pointers in this regard would be greatly appreciated.

I was thinking that reg_equiv_memory_loc array can be used to get the
memory information of the pseudo and then test something like:


                if (reg_equiv_memory_loc[i] &&
                    GET_CODE(r) == SYMBOL_REF &&
                    CONSTANT_POOL_ADDRESS_P(r) &&
                    ! (flag_pic &&
                      symbol_mentioned_p (get_pool_constant (X)))
                   )

to test for globals,

                if (reg_equiv_memory_loc[i]){
                if (MEM_IN_STRUCT(reg_equiv_memory_loc[i]))

to test for struct variable, and

                if (!(MEM_SCALAR_P(reg_equiv_memory_loc[i])))

to test for rest of local variables.

Is this correct?

For some pseudos reg_equiv_memory_loc is returning NULL. And those are the
cases that are causing me to thing otherwise.

Warm regards,
Krishna.

Reply via email to