aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/utils.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2004-03-21 18:09:20 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2004-03-21 13:09:20 -0500
commit6fce44af562fae5ad9275e183abdf6cf87a87f6e (patch)
tree7935f9b36f94acbc172af472df20b0384eb56ff8 /gcc/ada/utils.c
parentfc5fccdee994a93c1360b9a2934f0232820f9333 (diff)
downloadgcc-6fce44af562fae5ad9275e183abdf6cf87a87f6e.zip
gcc-6fce44af562fae5ad9275e183abdf6cf87a87f6e.tar.gz
gcc-6fce44af562fae5ad9275e183abdf6cf87a87f6e.tar.bz2
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
Diffstat (limited to 'gcc/ada/utils.c')
-rw-r--r--gcc/ada/utils.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 37a9fbd..cd3f47c 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -2180,8 +2180,6 @@ max_size (tree exp, int max_p)
gigi_abort (407);
else if (code == COMPOUND_EXPR)
return max_size (TREE_OPERAND (exp, 1), max_p);
- else if (code == WITH_RECORD_EXPR)
- return exp;
{
tree lhs = max_size (TREE_OPERAND (exp, 0), max_p);
@@ -2275,12 +2273,9 @@ build_template (tree template_type, tree array_type, tree expr)
max = convert (TREE_TYPE (field), TYPE_MAX_VALUE (bounds));
/* If either MIN or MAX involve a PLACEHOLDER_EXPR, we must
- surround them with a WITH_RECORD_EXPR giving EXPR as the
- OBJECT. */
- if (CONTAINS_PLACEHOLDER_P (min))
- min = build (WITH_RECORD_EXPR, TREE_TYPE (min), min, expr);
- if (CONTAINS_PLACEHOLDER_P (max))
- max = build (WITH_RECORD_EXPR, TREE_TYPE (max), max, expr);
+ substitute it from OBJECT. */
+ min = SUBSTITUTE_PLACEHOLDER_IN_EXPR (min, expr);
+ max = SUBSTITUTE_PLACEHOLDER_IN_EXPR (max, expr);
template_elts = tree_cons (TREE_CHAIN (field), max,
tree_cons (field, min, template_elts));
@@ -2865,12 +2860,6 @@ convert (tree type, tree expr)
else if (AGGREGATE_TYPE_P (type)
&& TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (etype))
return build1 (NOP_EXPR, type, expr);
- /* If EXPR is a WITH_RECORD_EXPR, do the conversion inside and then make a
- new one. */
- else if (TREE_CODE (expr) == WITH_RECORD_EXPR)
- return build (WITH_RECORD_EXPR, type,
- convert (type, TREE_OPERAND (expr, 0)),
- TREE_OPERAND (expr, 1));
/* If the input type has padding, remove it by doing a component reference
to the field. If the output type has padding, make a constructor
@@ -3250,13 +3239,6 @@ maybe_unconstrained_array (tree exp)
(TREE_TYPE (TREE_TYPE (exp))))),
TREE_OPERAND (exp, 0));
- else if (code == WITH_RECORD_EXPR
- && (TREE_OPERAND (exp, 0)
- != (new = maybe_unconstrained_array
- (TREE_OPERAND (exp, 0)))))
- return build (WITH_RECORD_EXPR, TREE_TYPE (new), new,
- TREE_OPERAND (exp, 1));
-
case RECORD_TYPE:
/* If this is a padded type, convert to the unpadded type and see if
it contains a template. */
@@ -3295,13 +3277,6 @@ unchecked_convert (tree type, tree expr, int notrunc_p)
if (etype == type)
return expr;
- /* If EXPR is a WITH_RECORD_EXPR, do the conversion inside and then make a
- new one. */
- if (TREE_CODE (expr) == WITH_RECORD_EXPR)
- return build (WITH_RECORD_EXPR, type,
- unchecked_convert (type, TREE_OPERAND (expr, 0), notrunc_p),
- TREE_OPERAND (expr, 1));
-
/* If both types types are integral just do a normal conversion.
Likewise for a conversion to an unconstrained array. */
if ((((INTEGRAL_TYPE_P (type)