diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2000-12-30 13:10:51 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2000-12-30 08:10:51 -0500 |
commit | 1da68f560dd41ef12f15138fb1b1aff06067f4b7 (patch) | |
tree | 23f23dc6bdc5d0a2afd4675766fb43eb2ef34bc3 /gcc/stmt.c | |
parent | 2e9ab75de463a34abe8d5d0749999195d6e62942 (diff) | |
download | gcc-1da68f560dd41ef12f15138fb1b1aff06067f4b7.zip gcc-1da68f560dd41ef12f15138fb1b1aff06067f4b7.tar.gz gcc-1da68f560dd41ef12f15138fb1b1aff06067f4b7.tar.bz2 |
alias.c (alias_sets_conflict_p): New function.
* alias.c (alias_sets_conflict_p): New function.
(mems_in_disjoint_alias_sets_p): Use it.
(readonly_fields_p): Moved from expr.c; check for record type.
(objects_must_conflict_p): New function.
* calls.c (expand_call): Use assign_temp as much as possible, use
readonly variant if assigned once, and don't set memory attributes.
(emit_library_call_value_1, store_one_arg): Likewise.
* integrate.c (expand_inline_function): Likewise.
* stmt.c (expand_asm_operands, expand_return): Likewise.
* expr.c (copy_blkmode_from_reg, store_constructor): Likewise.
(store_field, save_noncopied_parts, expand_expr): Likewise.
(expand_expr_unaligned): Likewise.
(readonly_fields_p): Moved to alias.c.
(safe_from_p): Rework handling of SAVE_EXPR.
MEMs ony conflict if alias sets conflict; likewise for INDIRECT_REF.
* function.c (struct temp_slot): Delete field ALIAS_SET; add TYPE.
(assign_stack_for_temp): Use objects_must_confict_p.
Set all memory attributes from type, if specified.
(mark_temp_slot): Mark TYPE field.
* tree.h (alias_sets_conflict_p, readonly_fields_p): New decls.
(objects_must_conflict_p): Likewise.
* stmt.c (expand_decl): Don't use assign_stack_temp in error case.
(add_case_node): No need to copy nodes anymore.
From-SVN: r38559
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -1757,7 +1757,10 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line) || GET_CODE (op) == CONCAT) { tree type = TREE_TYPE (TREE_VALUE (tail)); - rtx memloc = assign_temp (type, 1, 1, 1); + tree qual_type = build_qualified_type (type, + (TYPE_QUALS (type) + | TYPE_QUAL_CONST)); + rtx memloc = assign_temp (qual_type, 1, 1, 1); emit_move_insn (memloc, op); op = memloc; @@ -3100,8 +3103,10 @@ expand_return (retval) { /* Calculate the return value into a temporary (usually a pseudo reg). */ - val = assign_temp (TREE_TYPE (DECL_RESULT (current_function_decl)), - 0, 0, 1); + tree ot = TREE_TYPE (DECL_RESULT (current_function_decl)); + tree nt = build_qualified_type (ot, TYPE_QUALS (ot) | TYPE_QUAL_CONST); + + val = assign_temp (nt, 0, 0, 1); val = expand_expr (retval_rhs, val, GET_MODE (val), 0); val = force_not_mem (val); emit_queue (); @@ -3822,12 +3827,13 @@ expand_decl (decl) if (type == error_mark_node) DECL_RTL (decl) = gen_rtx_MEM (BLKmode, const0_rtx); + else if (DECL_SIZE (decl) == 0) /* Variable with incomplete type. */ { if (DECL_INITIAL (decl) == 0) /* Error message was already done; now avoid a crash. */ - DECL_RTL (decl) = assign_stack_temp (DECL_MODE (decl), 0, 1); + DECL_RTL (decl) = gen_rtx_MEM (BLKmode, const0_rtx); else /* An initializer is going to decide the size of this array. Until we know the size, represent its address with a reg. */ @@ -4735,18 +4741,16 @@ add_case_node (low, high, label, duplicate) } } - /* Add this label to the chain, and succeed. - Copy LOW, HIGH so they are on temporary rather than momentary - obstack and will thus survive till the end of the case statement. */ + /* Add this label to the chain, and succeed. */ r = (struct case_node *) xmalloc (sizeof (struct case_node)); - r->low = copy_node (low); + r->low = low; /* If the bounds are equal, turn this into the one-value case. */ if (tree_int_cst_equal (low, high)) r->high = r->low; else - r->high = copy_node (high); + r->high = high; r->code_label = label; expand_label (label); |