This is the mail archive of the gcc@gcc.gnu.org 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]

Re: How to know the DEF operand that corresponds to a specific argument of a call to function?


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.


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