This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Obtaining a callsite address.
On Sun, Mar 10, 2013 at 10:54:39PM +1100, Matt Davis wrote:
> On Sun, Mar 10, 2013 at 9:35 PM, Basile Starynkevitch
> <basile@starynkevitch.net> wrote:
> > On Sun, Mar 10, 2013 at 01:51:04PM +1100, Matt Davis wrote:
> >> I have a GIMPLE_CALL gimple object. I want to get the tree node
> >> representing the callsite for this particular instance of a call, how
> >> can I get this information?
> >
> > I'm not sure to understand your question (what exactly do you mean by "callsite").
>
> Hi Basile,
> Thanks for the quick response. I have a particular instance of a
> function call within a function that I am analyzing (and
> transforming). I want the address of that function call, for which I
> do have a gimple_call instance of. I want to somehow create a symbol
> identifying that particular address/location for that instance of the
> function call. I need this address at runtime. I was inserting labels
> just after each function call, but the placement of my label was not
> always immediately after the function call, even if I set the label as
> being addressable and/or volatile.
I would rather put the label just before the function call, not after it. (or maybe do both)
Maybe you could do something else, like generate debug related gimples
But I don't understand well what will happen to these added gimples after your pass.
BTW, where exactly did you insert your pass?
Cheers
--
Basile STARYNKEVITCH http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***