Re: Getting variable attribute from rtx

2009-03-30 Thread Ian Lance Taylor
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

Re: Getting variable attribute from rtx

2009-03-30 Thread Dobes
Ian Lance Taylor-3 wrote: > > 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_sec

Re: Getting variable attribute from rtx

2009-03-30 Thread Ian Lance Taylor
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.

Re: Getting variable attribute from rtx

2009-03-28 Thread Dobes
>> 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. How can I do the same

Re: Getting variable attribute from rtx

2009-03-27 Thread Ian Lance Taylor
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

Re: Getting variable attribute from rtx

2009-03-27 Thread Eric Botcazou
> 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