From: Klemen Jan Enova <klemen.jan.enova@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: plugin: modify attribute arguments inside plugin
Date: Sat, 02 Aug 2014 08:25:00 -0000 [thread overview]
Message-ID: <53DCA062.1000707@gmail.com> (raw)
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.
next reply other threads:[~2014-08-02 8:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-02 8:25 Klemen Jan Enova [this message]
2014-08-03 7:31 ` Klemen Jan Enova
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DCA062.1000707@gmail.com \
--to=klemen.jan.enova@gmail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).