Re: Re: Re: help:how to get the Nth argument stmt from CALL_EXPR stmt tree

2005-07-10 Thread alert7
Daniel Berlin,您好! given int a1,a2,a3,a4; a1 = 1 ; a2 = 2 ; a3 = 3 ; a4 = 4 ; foo(a1+a2,a3+a4); I want get foo function first argument stmt tree--(a1+a2). then look the argument stmt tree OPERAND to find a1 and a2 variable.

Re: Re: help:how to get the Nth argument stmt from CALL_EXPR stmt tree

2005-07-06 Thread Daniel Berlin
On Wed, 2005-07-06 at 23:30 +0800, alert7 wrote: > Daniel Berlin,您好! > > I'am gcc beginner,thank your answer . > > Is it the return Value of GetCallArgOperand function that u given stmt > tree? No. > > I pass return value--ops to function FOR_EACH_SSA_TREE_OPERAND > F

Re: Re: help:how to get the Nth argument stmt from CALL_EXPR stmt tree

2005-07-06 Thread alert7
Daniel Berlin,您好! I'am gcc beginner,thank your answer . Is it the return Value of GetCallArgOperand function that u given stmt tree? I pass return value--ops to function FOR_EACH_SSA_TREE_OPERAND FOR_EACH_SSA_TREE_OPERAND (use, ops, iter, SSA_OP_ALL_USES){

Re: help:how to get the Nth argument stmt from CALL_EXPR stmt tree

2005-07-05 Thread Daniel Berlin
On Tue, 2005-07-05 at 23:18 +0800, alert7 wrote: > hi,all > > > I don't know how to get the Nth argument stmt from CALL_EXPR stmt tree? assuming TREE_CODE (call) == CALL_EXPR: GetCallArgOperand(tree call, int i) { int j = 0; tree arg; for (arg = TREE_OPERAND (

help:how to get the Nth argument stmt from CALL_EXPR stmt tree

2005-07-05 Thread alert7
hi,all I don't know how to get the Nth argument stmt from CALL_EXPR stmt tree? the GetCallArgOperands implement this function that i code ,but it isn't working :( thanks any advice or piece of example code . //