Dobes writes:
> Could you clarify a little about how/where to use lookup_attribute?
Use it wherever it is you need to know whether a symbol has your
attribute (I don't know when you need the information). In RTL you can
normally find the VAR_DECL using MEM_EXPR or REG_EXPR.
Ian
RIBUTES(DECL))) {
SYMBOL_REF_FLAGS(XEXP (rtl, 0)) |= SYMBOL_MYATTR_FLAG;
}
}
As I mentioned, this allows me to flag all of the globals/static locals but
does nothing for locals.
--
View this message in context:
http://www.nabble.com/Getting-variable-attribute-from-rtx-tp22745207p22790978.html
Sent from the gcc - Dev mailing list archive at Nabble.com.
Dobes writes:
>>> See the SYMBOL_REF_FLAGS stuff in rtl.h and various examples in the
>>> back-ends.
>> Or, better, look for uses of lookup_attribute.
>>
>
> OK, I've now got it working for globals and static locals by tagging the rtl
> in "encode_section_info" and checking for that tag later.
tag later. How can I do the
same for locals?
--
View this message in context:
http://www.nabble.com/Getting-variable-attribute-from-rtx-tp22745207p22758885.html
Sent from the gcc - Dev mailing list archive at Nabble.com.
Eric Botcazou writes:
>> I need to add support for some custom attributes that I need to know during
>> operand matching. I have no problem adding the attributes, but I don't
>> know what to do so that I can access the information later. My function
>> that is called to handle the attribute loo
> I need to add support for some custom attributes that I need to know during
> operand matching. I have no problem adding the attributes, but I don't
> know what to do so that I can access the information later. My function
> that is called to handle the attribute looks like this:
>
> static tre
http://www.nabble.com/Getting-variable-attribute-from-rtx-tp22745207p22745207.html
Sent from the gcc - Dev mailing list archive at Nabble.com.