public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* plugin: modify attribute arguments inside plugin
@ 2014-08-02  8:25 Klemen Jan Enova
  2014-08-03  7:31 ` Klemen Jan Enova
  0 siblings, 1 reply; 2+ messages in thread
From: Klemen Jan Enova @ 2014-08-02  8:25 UTC (permalink / raw)
  To: gcc-help

I would like to code a plugin, that would count the number of accesses 
to a field of some C struct.
That struct would be marked with __attribute__((access_count)). When 
handling that attribute, I
would like to assign an index to it (as an attribute argument), so that 
I can update the proper
element of my counter array, when there is a COMPONENT_REF with a marked 
struct as the target.

But attribute arguments are normally passed by the user, can the plugin 
change them, and how?
Juts checking that argument would be simpler and faster than looking for 
the target's name
(in a hashtable, or just an ordered array if there aren't going to be so 
many tracked structs)
and getting an index from that.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-03  7:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-02  8:25 plugin: modify attribute arguments inside plugin Klemen Jan Enova
2014-08-03  7:31 ` Klemen Jan Enova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).