From 6fce44af562fae5ad9275e183abdf6cf87a87f6e Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Sun, 21 Mar 2004 18:09:20 +0000 Subject: alias.c (get_alias_set): Remove handling of PLACEHOLDER_EXPR. * alias.c (get_alias_set): Remove handling of PLACEHOLDER_EXPR. * emit-rtl.c (component_ref_for_mem_expr): Likewise. (set_mem_attributes_minus_bitpos): Call SUBSTITUTE_PLACEHOLDER_IN_EXPR. * explow.c (expr_size): Likewise. * expr.h (placeholder_list, find_placeholder): Deleted. * expr.c (store_constructor): Likewise. (get_inner_reference): Likewise. Also don't call find_placeholder. (placeholder_list, find_placeholder): Deleted. (is_aligning_offset): Don't handle WITH_RECORD_EXPR, PLACEHOLDER_EXPR. (expand_expr_real, cases PLACEHOLDER_EXPR, WITH_RECORD_EXPR): Likewise. (highest_pow2_factor, case WITH_RECORD_EXPR): Remove. * dojump.c (do_jump, case WITH_RECORD_EXPR): Likewise. * dwarf2out.c (loc_descriptor_from_tree, case WITH_RECORD_EXPR): Likewise. * fold-const.c (invert_truthvalue, case WITH_RECORD_EXPR): Likewise. (extract_muldiv, case WITH_RECORD_EXPR): Likewise. * tree.c (expr_align, case WITH_RECORD_EXPR): Likewise. (contains_placeholder_p): Don't handle WITH_RECORD_EXPR. Clean up by using first_rtl_op. (substitute_in_expr): Use SUBSTITUTE_IN_EXPR for recursive call. (substitute_placeholder_in_expr): New function. * tree.def (WITH_RECORD_EXPR): Deleted. * tree.h (SUBSTITUTE_IN_EXPR, SUBSTITUTE_PLACEHOLDER_IN_EXPR): New. (substitute_placeholder_in_expr): New. * ada/decl.c (gnat_to_gnu_entity): Use SUBSTITUTE_PLACEHOLDER_IN_EXPR. * ada/trans.c (tree_transform, emit_index_check): Likewise. * ada/utils.c (build_template): Likewise. (max_size, convert): Remove handling of WITH_RECORD_EXPR. (maybe_unconstrained_array, unchecked_convert): Likewise. * ada/utils2.c (gnat_truthvalue_conversion, build_binary_op): Likewise. (build_unary_op): Likewise. (compare_arrays, build_allocator): Use SUBSTITUTE_PLACEHOLDER_IN_EXPR. (fill_vms_descriptor): Likewise. (build_call_alloc_dealloc): Likewise. ALIGN is unsigned. * ada/gigi.h (build_call_alloc_dealloc): Alignment is unsigned. From-SVN: r79789 --- gcc/emit-rtl.c | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'gcc/emit-rtl.c') diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 6d18b78..8d8ead1 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1409,19 +1409,13 @@ component_ref_for_mem_expr (tree ref) inner = component_ref_for_mem_expr (inner); else { - tree placeholder_ptr = 0; - /* Now remove any conversions: they don't change what the underlying - object is. Likewise for SAVE_EXPR. Also handle PLACEHOLDER_EXPR. */ + object is. Likewise for SAVE_EXPR. */ while (TREE_CODE (inner) == NOP_EXPR || TREE_CODE (inner) == CONVERT_EXPR || TREE_CODE (inner) == NON_LVALUE_EXPR || TREE_CODE (inner) == VIEW_CONVERT_EXPR - || TREE_CODE (inner) == SAVE_EXPR - || TREE_CODE (inner) == PLACEHOLDER_EXPR) - if (TREE_CODE (inner) == PLACEHOLDER_EXPR) - inner = find_placeholder (inner, &placeholder_ptr); - else - inner = TREE_OPERAND (inner, 0); + || TREE_CODE (inner) == SAVE_EXPR) + inner = TREE_OPERAND (inner, 0); if (! DECL_P (inner)) inner = NULL_TREE; @@ -1608,20 +1602,14 @@ set_mem_attributes_minus_bitpos (rtx ref, tree t, int objectp, index = fold (build (MINUS_EXPR, TREE_TYPE (index), index, low_bound)); - /* If the index has a self-referential type, pass it to a - WITH_RECORD_EXPR; if the component size is, pass our - component to one. */ - if (CONTAINS_PLACEHOLDER_P (index)) - index = build (WITH_RECORD_EXPR, TREE_TYPE (index), index, t2); - if (CONTAINS_PLACEHOLDER_P (unit_size)) - unit_size = build (WITH_RECORD_EXPR, sizetype, - unit_size, array); - + /* If the index has a self-referential type, instantiate it; + likewise for the component size. */ + index = SUBSTITUTE_PLACEHOLDER_IN_EXPR (index, t2); + unit_size = SUBSTITUTE_PLACEHOLDER_IN_EXPR (unit_size, array); off_tree = fold (build (PLUS_EXPR, sizetype, fold (build (MULT_EXPR, sizetype, - index, - unit_size)), + index, unit_size)), off_tree)); t2 = TREE_OPERAND (t2, 0); } -- cgit v1.1