aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.def
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/tree.def
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/tree.def')
-rw-r--r--gcc/tree.def31
1 files changed, 9 insertions, 22 deletions
diff --git a/gcc/tree.def b/gcc/tree.def
index 7891974..d56142f 100644
--- a/gcc/tree.def
+++ b/gcc/tree.def
@@ -541,35 +541,22 @@ DEFTREECODE (CLEANUP_POINT_EXPR, "cleanup_point_expr", 'e', 1)
actual size at run-time. In the following, we describe how this
calculation is done.
- When we wish to evaluate a size or offset, we check whether it
- contains a PLACEHOLDER_EXPR. If it does, we construct a
- WITH_RECORD_EXPR that contains both the expression we wish to
- evaluate and an expression within which the object may be found.
- The latter expression is the object itself in the simple case of an
- Ada record with discriminant, but it can be the array in the case of
- an unconstrained array.
+ When we wish to evaluate a size or offset, we check whether it contains a
+ PLACEHOLDER_EXPR. If it does, we call substitute_placeholder_in_expr
+ passing both that tree and an expression within which the object may be
+ found. The latter expression is the object itself in the simple case of
+ an Ada record with discriminant, but it can be the array in the case of an
+ unconstrained array.
In the latter case, we need the fat pointer, because the bounds of
the array can only be accessed from it. However, we rely here on the
fact that the expression for the array contains the dereference of
- the fat pointer that obtained the array pointer.
+ the fat pointer that obtained the array pointer. */
- Accordingly, when looking for the object to substitute in place of
- a PLACEHOLDER_EXPR, we look down the first operand of the expression
- passed as the second operand to WITH_RECORD_EXPR until we find
- something of the desired type or reach a constant. */
-
-/* Denotes a record to later be supplied with a WITH_RECORD_EXPR when
- evaluating this expression. The type of this expression is used to
- find the record to replace it. */
+/* Denotes a record to later be substitued before evaluating this expression.
+ The type of this expression is used to find the record to replace it. */
DEFTREECODE (PLACEHOLDER_EXPR, "placeholder_expr", 'x', 0)
-/* Provide an expression that references a record to be used in place
- of a PLACEHOLDER_EXPR. The record to be used is the record within
- operand 1 that has the same type as the PLACEHOLDER_EXPR in
- operand 0. */
-DEFTREECODE (WITH_RECORD_EXPR, "with_record_expr", 'e', 2)
-
/* Simple arithmetic. */
DEFTREECODE (PLUS_EXPR, "plus_expr", '2', 2)
DEFTREECODE (MINUS_EXPR, "minus_expr", '2', 2)