Commit 821bb7f8 by Richard Guenther Committed by Richard Biener

tree-ssa-operands.c (get_expr_operands): Do not handle INDIRECT_REFs in the handled-component case.

2009-05-29  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-operands.c (get_expr_operands): Do not handle
	INDIRECT_REFs in the handled-component case.  Remove
	unused get_ref_base_and_extent case.
	* tree-dfa.c (get_ref_base_and_extent): Avoid calling
	tree_low_cst and host_integerp where possible.
	* tree-ssa-structalias.c (equiv_class_label_eq): Check hash
	codes for equivalence.
	* dce.c (find_call_stack_args): Avoid redundant bitmap queries.

From-SVN: r147973
parent e997fb9c
2009-05-29 Richard Guenther <rguenther@suse.de>
* tree-ssa-operands.c (get_expr_operands): Do not handle
INDIRECT_REFs in the handled-component case. Remove
unused get_ref_base_and_extent case.
* tree-dfa.c (get_ref_base_and_extent): Avoid calling
tree_low_cst and host_integerp where possible.
* tree-ssa-structalias.c (equiv_class_label_eq): Check hash
codes for equivalence.
* dce.c (find_call_stack_args): Avoid redundant bitmap queries.
2009-05-29 David Billinghurst <billingd@gcc.gnu.org> 2009-05-29 David Billinghurst <billingd@gcc.gnu.org>
* config.gcc: Add i386/t-fprules-softfp and soft-fp/t-softfp * config.gcc: Add i386/t-fprules-softfp and soft-fp/t-softfp
......
...@@ -354,8 +354,8 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast, ...@@ -354,8 +354,8 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast,
} }
for (byte = off; byte < off + INTVAL (MEM_SIZE (mem)); byte++) for (byte = off; byte < off + INTVAL (MEM_SIZE (mem)); byte++)
{ {
gcc_assert (!bitmap_bit_p (sp_bytes, byte - min_sp_off)); if (!bitmap_set_bit (sp_bytes, byte - min_sp_off))
bitmap_set_bit (sp_bytes, byte - min_sp_off); gcc_unreachable ();
} }
} }
...@@ -442,9 +442,8 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast, ...@@ -442,9 +442,8 @@ find_call_stack_args (rtx call_insn, bool do_mark, bool fast,
{ {
if (byte < min_sp_off if (byte < min_sp_off
|| byte >= max_sp_off || byte >= max_sp_off
|| !bitmap_bit_p (sp_bytes, byte - min_sp_off)) || !bitmap_clear_bit (sp_bytes, byte - min_sp_off))
break; break;
bitmap_clear_bit (sp_bytes, byte - min_sp_off);
} }
if (!deletable_insn_p (insn, fast, NULL)) if (!deletable_insn_p (insn, fast, NULL))
......
...@@ -750,7 +750,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset, ...@@ -750,7 +750,7 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
switch (TREE_CODE (exp)) switch (TREE_CODE (exp))
{ {
case BIT_FIELD_REF: case BIT_FIELD_REF:
bit_offset += tree_low_cst (TREE_OPERAND (exp, 2), 0); bit_offset += TREE_INT_CST_LOW (TREE_OPERAND (exp, 2));
break; break;
case COMPONENT_REF: case COMPONENT_REF:
...@@ -761,13 +761,14 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset, ...@@ -761,13 +761,14 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == UNION_TYPE) if (TREE_CODE (TREE_TYPE (TREE_OPERAND (exp, 0))) == UNION_TYPE)
seen_union = true; seen_union = true;
if (this_offset && TREE_CODE (this_offset) == INTEGER_CST) if (this_offset
&& TREE_CODE (this_offset) == INTEGER_CST
&& host_integerp (this_offset, 0))
{ {
HOST_WIDE_INT hthis_offset = tree_low_cst (this_offset, 0); HOST_WIDE_INT hthis_offset = TREE_INT_CST_LOW (this_offset);
hthis_offset *= BITS_PER_UNIT; hthis_offset *= BITS_PER_UNIT;
bit_offset += hthis_offset; bit_offset += hthis_offset;
bit_offset += tree_low_cst (DECL_FIELD_BIT_OFFSET (field), 0); bit_offset += TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (field));
} }
else else
{ {
...@@ -787,18 +788,20 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset, ...@@ -787,18 +788,20 @@ get_ref_base_and_extent (tree exp, HOST_WIDE_INT *poffset,
case ARRAY_RANGE_REF: case ARRAY_RANGE_REF:
{ {
tree index = TREE_OPERAND (exp, 1); tree index = TREE_OPERAND (exp, 1);
tree low_bound = array_ref_low_bound (exp); tree low_bound, unit_size;
tree unit_size = array_ref_element_size (exp);
/* If the resulting bit-offset is constant, track it. */ /* If the resulting bit-offset is constant, track it. */
if (host_integerp (index, 0) if (TREE_CODE (index) == INTEGER_CST
&& host_integerp (low_bound, 0) && host_integerp (index, 0)
&& host_integerp (unit_size, 1)) && (low_bound = array_ref_low_bound (exp),
host_integerp (low_bound, 0))
&& (unit_size = array_ref_element_size (exp),
host_integerp (unit_size, 1)))
{ {
HOST_WIDE_INT hindex = tree_low_cst (index, 0); HOST_WIDE_INT hindex = TREE_INT_CST_LOW (index);
hindex -= tree_low_cst (low_bound, 0); hindex -= TREE_INT_CST_LOW (low_bound);
hindex *= tree_low_cst (unit_size, 1); hindex *= TREE_INT_CST_LOW (unit_size);
hindex *= BITS_PER_UNIT; hindex *= BITS_PER_UNIT;
bit_offset += hindex; bit_offset += hindex;
......
...@@ -904,19 +904,9 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags) ...@@ -904,19 +904,9 @@ get_expr_operands (gimple stmt, tree *expr_p, int flags)
case REALPART_EXPR: case REALPART_EXPR:
case IMAGPART_EXPR: case IMAGPART_EXPR:
{ {
tree ref;
HOST_WIDE_INT offset, size, maxsize;
if (TREE_THIS_VOLATILE (expr)) if (TREE_THIS_VOLATILE (expr))
gimple_set_has_volatile_ops (stmt, true); gimple_set_has_volatile_ops (stmt, true);
ref = get_ref_base_and_extent (expr, &offset, &size, &maxsize);
if (TREE_CODE (ref) == INDIRECT_REF)
{
get_indirect_ref_operands (stmt, ref, flags, false);
flags |= opf_no_vops;
}
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags); get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
if (code == COMPONENT_REF) if (code == COMPONENT_REF)
......
...@@ -1864,7 +1864,8 @@ equiv_class_label_eq (const void *p1, const void *p2) ...@@ -1864,7 +1864,8 @@ equiv_class_label_eq (const void *p1, const void *p2)
{ {
const_equiv_class_label_t const eql1 = (const_equiv_class_label_t) p1; const_equiv_class_label_t const eql1 = (const_equiv_class_label_t) p1;
const_equiv_class_label_t const eql2 = (const_equiv_class_label_t) p2; const_equiv_class_label_t const eql2 = (const_equiv_class_label_t) p2;
return bitmap_equal_p (eql1->labels, eql2->labels); return (eql1->hashcode == eql2->hashcode
&& bitmap_equal_p (eql1->labels, eql2->labels));
} }
/* Lookup a equivalence class in TABLE by the bitmap of LABELS it /* Lookup a equivalence class in TABLE by the bitmap of LABELS it
......
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