Author: laijx Date: 2011-04-25 01:32:17 -0400 (Mon, 25 Apr 2011) New Revision: 3568
Modified: trunk/osprey/be/opt/opt_revise_ssa.cxx Log: Remove unnecessary CHI generated by lda-indirect folding. For the following case: 1 int in[10]; 2 voif foo(int i) { 3 int *p = in; 4 *p++ = i++; 5 *p++ = i++; 6 *p++ = i++; 7 *p++ = i++; Lda-Indirect folding will generate extra CHIs for stmt 5, 6, 7. This patch will prevent generating those unnecessary CHIs. Reviewed by Sun Chan and Fred. Modified: trunk/osprey/be/opt/opt_revise_ssa.cxx =================================================================== --- trunk/osprey/be/opt/opt_revise_ssa.cxx 2011-04-21 23:47:46 UTC (rev 3567) +++ trunk/osprey/be/opt/opt_revise_ssa.cxx 2011-04-25 05:32:17 UTC (rev 3568) @@ -269,6 +269,7 @@ _symbols_to_revise->Union1D(idx); AUX_STAB_ENTRY *aux = _opt_stab->Aux_stab_entry(idx); aux->Points_to()->Set_expr_kind(EXPR_IS_ADDR); + aux->Points_to()->Set_ofst_kind(OFST_IS_FIXED); aux->Points_to()->Set_named(); cr->Set_scalar_aux_id(idx); @@ -389,6 +390,7 @@ _symbols_to_revise->Union1D(idx); AUX_STAB_ENTRY *aux = _opt_stab->Aux_stab_entry(idx); aux->Points_to()->Set_expr_kind(EXPR_IS_ADDR); + aux->Points_to()->Set_expr_kind(OFST_IS_FIXED); aux->Points_to()->Set_named(); lhs->Set_scalar_aux_id(idx); @@ -483,6 +485,7 @@ _symbols_to_revise->Union1D(idx); AUX_STAB_ENTRY *aux = _opt_stab->Aux_stab_entry(idx); aux->Points_to()->Set_expr_kind(EXPR_IS_ADDR); + aux->Points_to()->Set_ofst_kind(OFST_IS_FIXED); aux->Points_to()->Set_named(); cr->Set_scalar_aux_id(idx); @@ -592,6 +595,7 @@ _symbols_to_revise->Union1D(idx); AUX_STAB_ENTRY *aux = _opt_stab->Aux_stab_entry(idx); aux->Points_to()->Set_expr_kind(EXPR_IS_ADDR); + aux->Points_to()->Set_expr_kind(OFST_IS_FIXED); aux->Points_to()->Set_named(); lhs->Set_scalar_aux_id(idx); ------------------------------------------------------------------------------ Fulfilling the Lean Software Promise Lean software platforms are now widely adopted and the benefits have been demonstrated beyond question. Learn why your peers are replacing JEE containers with lightweight application servers - and what you can gain from the move. http://p.sf.net/sfu/vmware-sfemails _______________________________________________ Open64-devel mailing list Open64-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/open64-devel