[PATCH] Fix ICE with profiling

Richard Guenther rguenther@suse.de
Wed Nov 17 16:29:00 GMT 2010


This fixes an ICE with value-profiling which happens because SSA
operands are not up-to-date when updating SSA form.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.

Richard.

2010-11-17  Richard Guenther  <rguenther@suse.de>

	* value-prof.c (gimple_divmod_fixed_value_transform): Update
	the stmt.
	(gimple_mod_pow2_value_transform): Likewise.
	(gimple_mod_subtract_transform): Likewise.

Index: gcc/value-prof.c
===================================================================
*** gcc/value-prof.c	(revision 166869)
--- gcc/value-prof.c	(working copy)
*************** gimple_divmod_fixed_value_transform (gim
*** 702,707 ****
--- 702,708 ----
      }
  
    gimple_assign_set_rhs_from_tree (si, result);
+   update_stmt (gsi_stmt (*si));
  
    return true;
  }
*************** gimple_mod_pow2_value_transform (gimple_
*** 851,856 ****
--- 852,858 ----
    result = gimple_mod_pow2 (stmt, prob, count, all);
  
    gimple_assign_set_rhs_from_tree (si, result);
+   update_stmt (gsi_stmt (*si));
  
    return true;
  }
*************** gimple_mod_subtract_transform (gimple_st
*** 1051,1056 ****
--- 1053,1059 ----
    result = gimple_mod_subtract (stmt, prob1, prob2, i, count1, count2, all);
  
    gimple_assign_set_rhs_from_tree (si, result);
+   update_stmt (gsi_stmt (*si));
  
    return true;
  }



More information about the Gcc-patches mailing list