Sorry for the delayed response.

Masaki Arai <masaki.a...@linaro.org> writes:
> Hi,
>
> Thank you very much for your quick check and reply.
>
> Kugan Vivekanandarajah <kugan.vivekanandara...@linaro.org> writes:
>> > I looked into the structure, adding this field is not going to make the
> s=
>> tructure bigger for either ILP32 or LP64 targets.  If you want, you use
> bit=
>> -fields; there is one bool already there which means you can fit 8 bits
> in =
>> the same area as currently taken up by that one.
>
>> Yes. I should have checked the mem_attrs structure. This does have at
>> least a byte left unlike some other tightly packed structures (gimple
>> and some tree structures in gcc).
>
> Even though memory usage does not increase, I understand the policy of
> wanting to make the data structure simple.

FWIW, I think adding a field for this should be fine.  It's very much in
the spirit of ORIGINAL_REGNO, which also exists to record the effects of
register allocation and reloading.

Perhaps one question is how the flag should interact with mem_attrs_eq_p,
but I suppose in practice, if everything else about two mem_attrs is the
same, the spill flag should be too, and so there should be no need to
check the spill flag explicitly.

An alternative to adding a new flag might be to check:

   MEM_EXPR (mem) == get_spill_slot_decl (false)

But this would bake in the assumption that everything we want to mark
as a spill slot will use set_mem_attrs_for_spill, whereas the flag
would allow other MEMs to be marked as spill slots too.

Thanks,
Richard
_______________________________________________
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/linaro-toolchain

Reply via email to