diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-01 11:00:47 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-10-01 11:00:47 +0000 |
commit | c6259b835bb14dd8bd25fb2a41dd15f1d3d62a81 (patch) | |
tree | a2295f973363e17dc793a7b1597e907c1198e6a0 /gcc/function.c | |
parent | d04314b8c819bd4be0f24c3e36eacfef14dee5c5 (diff) | |
download | gcc-c6259b835bb14dd8bd25fb2a41dd15f1d3d62a81.tar.gz |
* function.c (keep_stack_depressed): Don't use delete_insn.
* expr.h (set_mem_alias_set): Move decl to here.
* rtl.h (mem_attrs): New typedef and struct.
(union rtunion_def): Add field for mem_attrs.
(X0MEMATTR, MEM_ATTRS): New macros.
(MEM_ALIAS_SET): Use MEM_ATTRS.
(MEM_DECL, MEM_OFFSET, MEM_SIZE, MEM_ALIGN): New macros.
(MEM_COPY_ATTRIBUTES): Copy MEM_ATTRS.
(set_mem_alias_set): Delete decl from here.
* alias.c (set_mem_alias_set): Delete from here.
* emit-rtl.c (mem_attrs_htab): New variable.
(rtx_htab_mark, rtx_htab_mark_1): Deleted.
(mem_attrs_htab_hash, mem_attrs_htab_eq): New functions.
(mem_attrs_mark, get_mem_attrs): Likewise.
(gen_rtx_MEM): Clear MEM_ATTRS.
(set_mem_attributes): Move to here.
(set_mem_alias_set): Likewise, and call get_mem_attrs.
(init_emit_once): const_int_htab now deletable htab.
Initialize mem_attrs_htab.
* explow.c (set_mem_attributes): Delete from here.
* function.c (put_var_into_stack): Clear MEM_ATTRS.
(gen_mem_addressof): Likewise; rework to use set_mem_attributes.
* ggc-common.c (ggc_mark_rtx_children, case MEM): New case.
* reload1.c (reload): Rework changing REG to MEM.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45922 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/gcc/function.c b/gcc/function.c index c6fa510ef40..fed2b3b68c7 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -1406,6 +1406,7 @@ put_var_into_stack (decl) /* Change the CONCAT into a combined MEM for both parts. */ PUT_CODE (reg, MEM); + MEM_ATTRS (reg) = 0; /* set_mem_attributes uses DECL_RTL to avoid re-generating of already computed alias sets. Here we want to re-generate. */ @@ -1476,6 +1477,7 @@ put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p, PUT_CODE (reg, MEM); PUT_MODE (reg, decl_mode); XEXP (reg, 0) = XEXP (new, 0); + MEM_ATTRS (reg) = 0; /* `volatil' bit means one thing for MEMs, another entirely for REGs. */ MEM_VOLATILE_P (reg) = volatile_p; @@ -1490,6 +1492,7 @@ put_reg_into_stack (function, reg, type, promoted_mode, decl_mode, volatile_p, AGGREGATE_TYPE_P (type) || MEM_IN_STRUCT_P (new)); set_mem_alias_set (reg, get_alias_set (type)); } + if (used_p) schedule_fixup_var_refs (function, reg, type, promoted_mode, ht); } @@ -2840,29 +2843,35 @@ gen_mem_addressof (reg, decl) RTX_UNCHANGING_P (XEXP (r, 0)) = RTX_UNCHANGING_P (reg); PUT_CODE (reg, MEM); + MEM_ATTRS (reg) = 0; XEXP (reg, 0) = r; + if (decl) { tree type = TREE_TYPE (decl); enum machine_mode decl_mode = (TREE_CODE (decl) == SAVE_EXPR ? TYPE_MODE (TREE_TYPE (decl)) : DECL_MODE (decl)); + rtx decl_rtl = decl ? DECL_RTL_IF_SET (decl) : 0; PUT_MODE (reg, decl_mode); - MEM_VOLATILE_P (reg) = TREE_SIDE_EFFECTS (decl); - MEM_SET_IN_STRUCT_P (reg, AGGREGATE_TYPE_P (type)); + + /* Clear DECL_RTL momentarily so functions below will work + properly, then set it again. */ + if (decl_rtl == reg) + SET_DECL_RTL (decl, 0); + + set_mem_attributes (reg, decl, 1); set_mem_alias_set (reg, set); + if (decl_rtl == reg) + SET_DECL_RTL (decl, reg); + if (TREE_USED (decl) || DECL_INITIAL (decl) != 0) fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type), 0); } else - { - /* We have no alias information about this newly created MEM. */ - set_mem_alias_set (reg, 0); - - fixup_var_refs (reg, GET_MODE (reg), 0, 0); - } + fixup_var_refs (reg, GET_MODE (reg), 0, 0); return reg; } @@ -7141,8 +7150,11 @@ keep_stack_depressed (seq) else sp_modified_unknown = 1; - /* Don't allow the SP modification to happen. */ - delete_insn (insn); + /* Don't allow the SP modification to happen. We don't call + delete_insn here since INSN isn't in any chain. */ + PUT_CODE (insn, NOTE); + NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED; + NOTE_SOURCE_FILE (insn) = 0; } else if (reg_referenced_p (stack_pointer_rtx, PATTERN (insn))) { |