[patch] Predictive commoning

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Thu Jan 18 15:04:00 GMT 2007


> 3) For predictive commoning, it is essential that the life ranges of
>    the temporary ssa names it creates do not start to overlap (since
>    that would increase the number of registers that are necessary, and
>    prevent us from coalescing the ssa names that correspond to one
>    temporary, thus forcing us to insert moves between the temporary
>    variables).  Unfortunately, even on the trivial examples the patch
>    adds to the testsuite, the optimizers change the life ranges of the
>    temporaries, thus spoiling the code.  To avoid this, we set
>    SSA_NAME_OCCURS_IN_ABNORMAL_PHI for the temporary ssa names created
>    by predictive commoning.

Maybe it's enough to treat *all* SSA names as if they occurred in an 
abnormal PHI, after loop optimizations?  Which brings the question of 
which scalar passes we really need after loop optimization.

Currently we have quite a few:

   NEXT_PASS (pass_cse_reciprocals);
   NEXT_PASS (pass_reassoc);
   NEXT_PASS (pass_vrp);
   NEXT_PASS (pass_dominator);
   NEXT_PASS (pass_phi_only_cprop);
   NEXT_PASS (pass_cd_dce);
   NEXT_PASS (pass_late_warn_uninitialized);
   NEXT_PASS (pass_dse);
   NEXT_PASS (pass_forwprop);
   NEXT_PASS (pass_phiopt);
   NEXT_PASS (pass_tail_calls);
   NEXT_PASS (pass_rename_ssa_copies);
   NEXT_PASS (pass_uncprop);

Paolo



More information about the Gcc-patches mailing list