This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: How to know the DEF operand that corresponds to a specific argument of a call to function?
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Davide Pozza <davide dot pozza77 at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 19 May 2005 11:45:46 -0400
- Subject: Re: How to know the DEF operand that corresponds to a specific argument of a call to function?
- References: <f76aa85605051907424a2672df@mail.gmail.com>
On Thu, May 19, 2005 at 04:42:29PM +0200, Davide Pozza wrote:
> Calling the get_def_operand for this statement with index 0, the
> function has to return the tree corresponding to buf_13.
>
If the argument you are looking for is not call-clobbered (not in
the call_clobbered_vars set) you can return NULL_TREE directly.
Otherwise, look for a match between the DECL in the argument (you
may need to strip ADDR_EXPRs) and the SSA_NAME_VAR (op) for every
v-may-def in the vops for the statement.
All this will fail if GCC decided to cluster call-clobbered
variables under .global_var.
What exactly are you trying to do?
Diego.