View | Details | Return to bug 20725
Collapse All | Expand All

(-)tree-ssa-pre.c (-7 / +12 lines)
Lines 1777-1789 add_to_sets (tree var, tree expr, vuse_o Link Here
1777
/* Given a unary or binary expression EXPR, create and return a new
1777
/* Given a unary or binary expression EXPR, create and return a new
1778
   expression with the same structure as EXPR but with its operands
1778
   expression with the same structure as EXPR but with its operands
1779
   replaced with the value handles of each of the operands of EXPR.
1779
   replaced with the value handles of each of the operands of EXPR.
1780
   Insert EXPR's operands into the EXP_GEN set for BLOCK.
1780
   Insert EXPR's operands into the EXP_GEN set for BLOCK. */
1781
1782
   VUSES represent the virtual use operands associated with EXPR (if
1783
   any). They are used when computing the hash value for EXPR.  */
1784
1781
1785
static inline tree
1782
static inline tree
1786
create_value_expr_from (tree expr, basic_block block, vuse_optype vuses)
1783
create_value_expr_from (tree expr, basic_block block)
1784
1787
{
1785
{
1788
  int i;
1786
  int i;
1789
  enum tree_code code = TREE_CODE (expr);
1787
  enum tree_code code = TREE_CODE (expr);
Lines 1822-1829 create_value_expr_from (tree expr, basic Link Here
1822
	  return NULL;
1820
	  return NULL;
1823
	}
1821
	}
1824
1822
1823
      /* Recursively value-numberize reference ops */
1824
      if (TREE_CODE_CLASS (TREE_CODE (op)) == tcc_reference)
1825
	{
1826
	  tree tempop = create_value_expr_from (op, block);
1827
	  op = tempop ? tempop : op;
1828
	}
1829
1825
      /* Create a value handle for OP and add it to VEXPR.  */
1830
      /* Create a value handle for OP and add it to VEXPR.  */
1826
      val = vn_lookup_or_add (op, vuses);
1831
      val = vn_lookup_or_add (op, NULL);
1827
1832
1828
      if (!is_undefined_value (op))
1833
      if (!is_undefined_value (op))
1829
	value_insert_into_set (EXP_GEN (block), op);
1834
	value_insert_into_set (EXP_GEN (block), op);
Lines 1939-1945 compute_avail (void) Link Here
1939
		     create a duplicate expression with the operands
1944
		     create a duplicate expression with the operands
1940
		     replaced with the value handles of the original
1945
		     replaced with the value handles of the original
1941
		     RHS.  */
1946
		     RHS.  */
1942
		  tree newt = create_value_expr_from (rhs, block, vuses);
1947
		  tree newt = create_value_expr_from (rhs, block);
1943
		  if (newt)
1948
		  if (newt)
1944
		    {
1949
		    {
1945
		      add_to_sets (lhs, newt, vuses, TMP_GEN (block),
1950
		      add_to_sets (lhs, newt, vuses, TMP_GEN (block),

Return to bug 20725