summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-03 00:15:50 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-03 00:15:50 +0000
commit67c155cb511cac5924bf843a667d9da60b42c481 (patch)
tree1c3ed35626f7a5ec145a2aaec1364cd9a760a955 /gcc/stor-layout.c
parent984b5589eafa9db32cae18d083b4dead675985b0 (diff)
downloadgcc-67c155cb511cac5924bf843a667d9da60b42c481.tar.gz
* c-decl.c (grokdeclarator): Don't frob current_function_decl
around variable_size. (set_decl_nonlocal): Remove. (store_parm_decls): Add stmts for pending sizes. * calls.c (calls_function, calls_function_1): Remove. (precompute_arguments): Don't call it. * cfgexpand.c (set_save_expr_context): Remove. (tree_expand_cfg): Don't call it. * dwarf2out.c (add_bound_info): Don't handle SAVE_EXPR. (dwarf2out_finish): Likewise. * expr.c (emit_block_move): Adjust addresses to BLKmode. (store_constructor): Don't pre-evaluate SAVE_EXPR. (safe_from_p): Don't queue SAVE_EXPRs. (expand_expr_real_1 <case SAVE_EXPR>): Rewrite to expect, or build plain VAR_DECLs. * fold-const.c (twoval_comparison_p): Don't look at SAVE_EXPR_RTL. (fold): Likewise. (fold_checksum_tree): Don't special-case SAVE_EXPR. * function.c (free_after_compilation): Don't clear x_save_expr_regs. (put_var_into_stack): Don't handle SAVE_EXPR. (gen_mem_addressof): Likewise. * function.h (struct function): Remove x_save_expr_regs. (save_expr_regs): Remove. * gengtype.c (adjust_field_tree_exp): Don't special-case SAVE_EXPR. * print-tree.c (print_node): Don't dump SAVE_EXPR_NOPLACEHOLDER. * stor-layout.c (variable_size): Don't set it. (force_type_save_exprs, force_type_save_exprs_1): Remove. * tree-inline.c (remap_save_expr): Remove fn argument. Update all callers. Don't set SAVE_EXPR_CONTEXT. * tree-inline.h (remap_save_expr): Update decl. * tree.c (save_expr): Update build size. (first_rtl_op): Don't handle SAVE_EXPR. (unsave_expr_1, contains_placeholder_p): Likewise. (decl_function_context): Likewise. * tree.def (SAVE_EXPR): Remove args 1 and 2. * tree.h (SAVE_EXPR_CONTEXT, SAVE_EXPR_RTL): Remove. (SAVE_EXPR_NOPLACEHOLDER, SAVE_EXPR_PERSISTENT_P): Remove. cp/ * tree.c (cp_unsave_r): Update remap_save_expr call. java/ * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84036 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 94bc46fb564..cf97159b5c5 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -66,7 +66,6 @@ static void place_union_field (record_layout_info, tree);
static int excess_unit_span (HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT,
HOST_WIDE_INT, tree);
#endif
-static void force_type_save_exprs_1 (tree);
extern void debug_rli (record_layout_info);
/* SAVE_EXPRs for sizes of types and decls, waiting to be expanded. */
@@ -146,8 +145,6 @@ variable_size (tree size)
not wish to do that here; the array-size is the same in both
places. */
save = skip_simple_arithmetic (size);
- if (TREE_CODE (save) == SAVE_EXPR)
- SAVE_EXPR_PERSISTENT_P (save) = 1;
if (cfun && cfun->x_dont_save_pending_sizes_p)
/* The front-end doesn't want us to keep a list of the expressions
@@ -168,60 +165,6 @@ variable_size (tree size)
return size;
}
-
-/* Given a type T, force elaboration of any SAVE_EXPRs used in the definition
- of that type. */
-
-void
-force_type_save_exprs (tree t)
-{
- tree field;
-
- switch (TREE_CODE (t))
- {
- case ERROR_MARK:
- return;
-
- case ARRAY_TYPE:
- case SET_TYPE:
- case VECTOR_TYPE:
- /* It's probably overly-conservative to force elaboration of bounds and
- also the sizes, but it's better to be safe than sorry. */
- force_type_save_exprs_1 (TYPE_MIN_VALUE (TYPE_DOMAIN (t)));
- force_type_save_exprs_1 (TYPE_MAX_VALUE (TYPE_DOMAIN (t)));
- break;
-
- case RECORD_TYPE:
- case UNION_TYPE:
- case QUAL_UNION_TYPE:
- for (field = TYPE_FIELDS (t); field; field = TREE_CHAIN (field))
- if (TREE_CODE (field) == FIELD_DECL)
- {
- force_type_save_exprs (TREE_TYPE (field));
- force_type_save_exprs_1 (DECL_FIELD_OFFSET (field));
- }
- break;
-
- default:
- break;
- }
-
- force_type_save_exprs_1 (TYPE_SIZE (t));
- force_type_save_exprs_1 (TYPE_SIZE_UNIT (t));
-}
-
-/* Utility routine of above, to verify that SIZE has been elaborated and
- do so it it is a SAVE_EXPR and has not been. */
-
-static void
-force_type_save_exprs_1 (tree size)
-{
- if (size
- && (size = skip_simple_arithmetic (size))
- && TREE_CODE (size) == SAVE_EXPR
- && !SAVE_EXPR_RTL (size))
- expand_expr (size, NULL_RTX, VOIDmode, 0);
-}
#ifndef MAX_FIXED_MODE_SIZE
#define MAX_FIXED_MODE_SIZE GET_MODE_BITSIZE (DImode)