Hello,
> >what you do seems basically OK to me. The problem is that you also need
> >to fix the ssa form for the virtual operands of the added calls
> >(i.e., you must call mark_new_vars_to_rename for each of the calls,
> >and update_ssa once at the end of tree_handle_loop).
> >
> >Zdenek
> >
>
> Ok, by inserting the mark_new_vars_to_rename and the TODO_update_ssa
> flag in the associated struct tree_opt_pass.
>
> This works (yeah!) and I can link my call before loads but it seems to
> miss some...
>
> To pass through the statements I use :
>
> datarefs = VEC_alloc (data_reference_p, heap, 10);
> dependence_relations = VEC_alloc (ddr_p, heap, 10 * 10);
> compute_data_dependences_for_loop (loop_nest, true, &datarefs,
> &dependence_relations);
>
> for (j = 0; VEC_iterate (data_reference_p, datarefs, j, a); j++)
> {
> tree stmt = DR_STMT (a);
>
> /* See if it is a load */
> if (DR_IS_READ (a))
>
> However if in my test code I have this :
>
> for(i=0;i<10;i++)
> for(j=i+1;j<10;j++)
> {
> a = t[j];
> b = t[i-1];
>
> //Calculations with a and b...
> }
>
>
> I get am able to insert before the first load but the second doesn't
> seem captured, this is what I get from debug_loop_ir :
>
> __MarkovMainEntry (2);
> # VUSE <SMT.55_20>;
> a_12 = *D.2174_11;
> # VUSE <SMT.55_20>;
> b_18 = *D.2179_17;
>
> Any idea why ? I've looked around in the code to see how they parse
> the data dependance tree but I don't see a difference.
is there the data reference for it in the datarefs array?
Zdenek