Re: create_tmp_var() fail to create variable for loop with switch statement

2008-07-11 Thread Fern Moon
Dear Richard Guenther, In my pass code, my printf code use ivvarincedloop from API. create_iv (build_int_cst_type (integer_type_node, 0), build_int_cst_type (integer_type_node, 1), ivvarloop, loop, &bsi, insert_after, &ivvarloop, &ivvarincedloop); How can I use the

Re: create_tmp_var() fail to create variable for loop with switch statement

2008-07-11 Thread Richard Guenther
On Fri, Jul 11, 2008 at 5:23 PM, Fern Moon <[EMAIL PROTECTED]> wrote: > Dear sir, > > I write a pass to instrument loops to count runtime number of iterations. > I insert a variable in each loop by create_tmp_var() and output > the results by inserting a printf function at the exit edge of loop. >

create_tmp_var() fail to create variable for loop with switch statement

2008-07-11 Thread Fern Moon
Dear sir, I write a pass to instrument loops to count runtime number of iterations. I insert a variable in each loop by create_tmp_var() and output the results by inserting a printf function at the exit edge of loop. The code is the attachment. The problem is that for the loops without switch sta