This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Target attribute hooks questions

Hi all,

I'm looking at implementing target attributes for aarch64 and I have some questions about the hooks involved.
I haven't looked at this part of the compiler before, so forgive me if some of them seem obvious. I couldn't
figure it out from the documentation (

* Seems to me that TARGET_OPTION_VALID_ATTRIBUTE_P is the most important one that parses
the string inside the __attribute__ ((target ("..."))) and sets the target-specific
flags appropriately. Is that correct?

* What is TARGET_ATTRIBUTE_TABLE used for? It's supposed to map attributes to handlers?

* What is the use of TARGET_OPTION_SAVE and TARGET_OPTION_RESTORE? Is that used during
 something like LTO when different object files and functions are compiled with different
flags? Are these functions just supposed to 'backup' various tuning and ISA decisions?

* Is TARGET_COMP_TYPE_ATTRIBUTES the one that's supposed to handle incompatible attributes
being specified? (for example incompatible endianness or architecture levels)?

Thanks for any insight,

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]