Commit 49a1fb2d by Richard Guenther Committed by Richard Biener

tree-ssa-sccvn.h (vn_binary_op_lookup): Remove.

2008-03-08  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-sccvn.h (vn_binary_op_lookup): Remove.
	(vn_binary_op_insert): Likewise.
	(vn_unary_op_lookup): Likewise.
	(vn_unary_op_insert): Likewise.
	(vn_nary_op_lookup): Declare.
	(vn_nary_op_insert): Likewise.
	* tree-ssa-sccvn.c (struct vn_tables_s): Merge unary
	and binary hashes, use a single obstack for unary_op_pool
	and binary_op_pool.
	(struct vn_binary_op_s, struct vn_unary_op_s): Replace with
	a single struct vn_nary_op_s.  Store tree code length and
	a variable number of operands.
	(struct vn_reference_op_struct): Remove unused op2.
	(vn_reference_op_eq): Do not compare op2.
	(vn_reference_op_compute_hash): Do not compute hash of op2.
	(vn_unary_op_hash, vn_binary_op_hash): Replace with vn_nary_op_hash.
	(vn_unary_op_compute_hash, vn_binary_op_compute_hash): Replace
	with vn_nary_op_compute_hash.
	(vn_unary_op_eq, vn_binary_op_eq): Replace with vn_nary_op_eq.
	(vn_unary_op_lookup, vn_binary_op_lookup): Replace with
	vn_nary_op_lookup.
	(vn_unary_op_insert, vn_binary_op_insert): Replace with
	vn_nary_op_insert.
	(visit_unary_op): Call nary functions.
	(visit_binary_op): Likewise.
	(process_scc): Adjust for struct vn_tables_s changes.
	(allocate_vn_table): Likewise.
	(free_vn_table): Likewise.
	* tree-vn.c (vn_add): Call nary functions.
	(vn_lookup): Likewise.

From-SVN: r133038
parent ba4698e1
2008-03-08 Richard Guenther <rguenther@suse.de>
* tree-ssa-sccvn.h (vn_binary_op_lookup): Remove.
(vn_binary_op_insert): Likewise.
(vn_unary_op_lookup): Likewise.
(vn_unary_op_insert): Likewise.
(vn_nary_op_lookup): Declare.
(vn_nary_op_insert): Likewise.
* tree-ssa-sccvn.c (struct vn_tables_s): Merge unary
and binary hashes, use a single obstack for unary_op_pool
and binary_op_pool.
(struct vn_binary_op_s, struct vn_unary_op_s): Replace with
a single struct vn_nary_op_s. Store tree code length and
a variable number of operands.
(struct vn_reference_op_struct): Remove unused op2.
(vn_reference_op_eq): Do not compare op2.
(vn_reference_op_compute_hash): Do not compute hash of op2.
(vn_unary_op_hash, vn_binary_op_hash): Replace with vn_nary_op_hash.
(vn_unary_op_compute_hash, vn_binary_op_compute_hash): Replace
with vn_nary_op_compute_hash.
(vn_unary_op_eq, vn_binary_op_eq): Replace with vn_nary_op_eq.
(vn_unary_op_lookup, vn_binary_op_lookup): Replace with
vn_nary_op_lookup.
(vn_unary_op_insert, vn_binary_op_insert): Replace with
vn_nary_op_insert.
(visit_unary_op): Call nary functions.
(visit_binary_op): Likewise.
(process_scc): Adjust for struct vn_tables_s changes.
(allocate_vn_table): Likewise.
(free_vn_table): Likewise.
* tree-vn.c (vn_add): Call nary functions.
(vn_lookup): Likewise.
2008-03-08 Jakub Jelinek <jakub@redhat.com>
PR target/35498
......
......@@ -52,10 +52,8 @@ extern vn_ssa_aux_t VN_INFO_GET (tree);
bool run_scc_vn (void);
void free_scc_vn (void);
void switch_to_PRE_table (void);
tree vn_binary_op_lookup (tree);
void vn_binary_op_insert (tree, tree);
tree vn_unary_op_lookup (tree);
void vn_unary_op_insert (tree, tree);
tree vn_nary_op_lookup (tree);
void vn_nary_op_insert (tree, tree);
tree vn_reference_lookup (tree, VEC (tree, gc) *);
void vn_reference_insert (tree, tree, VEC (tree, gc) *);
VEC (tree, gc) *shared_vuses_from_stmt (tree);
......
......@@ -173,10 +173,10 @@ vn_add (tree expr, tree val)
{
case tcc_comparison:
case tcc_binary:
vn_binary_op_insert (expr, val);
vn_nary_op_insert (expr, val);
break;
case tcc_unary:
vn_unary_op_insert (expr, val);
vn_nary_op_insert (expr, val);
break;
/* In the case of array-refs of constants, for example, we can
end up with no vuses. */
......@@ -201,7 +201,7 @@ vn_add (tree expr, tree val)
}
else if (TREE_CODE (expr) == ADDR_EXPR)
{
vn_unary_op_insert (expr, val);
vn_nary_op_insert (expr, val);
break;
}
/* FALLTHROUGH */
......@@ -248,9 +248,9 @@ vn_lookup (tree expr)
{
case tcc_comparison:
case tcc_binary:
return vn_binary_op_lookup (expr);
return vn_nary_op_lookup (expr);
case tcc_unary:
return vn_unary_op_lookup (expr);
return vn_nary_op_lookup (expr);
break;
/* In the case of array-refs of constants, for example, we can
end up with no vuses. */
......@@ -268,7 +268,7 @@ vn_lookup (tree expr)
else if (TREE_CODE (expr) == SSA_NAME)
return SSA_NAME_VALUE (expr);
else if (TREE_CODE (expr) == ADDR_EXPR)
return vn_unary_op_lookup (expr);
return vn_nary_op_lookup (expr);
/* FALLTHROUGH */
default:
gcc_unreachable ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment