This is the mail archive of the 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: Inserting function calls

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).


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,

      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 :

            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.

Thank you again,

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