summaryrefslogtreecommitdiff
path: root/gcc/explow.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-01 11:00:47 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2001-10-01 11:00:47 +0000
commitc6259b835bb14dd8bd25fb2a41dd15f1d3d62a81 (patch)
treea2295f973363e17dc793a7b1597e907c1198e6a0 /gcc/explow.c
parentd04314b8c819bd4be0f24c3e36eacfef14dee5c5 (diff)
downloadgcc-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/explow.c')
-rw-r--r--gcc/explow.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/gcc/explow.c b/gcc/explow.c
index d01067de7ff..85c3a7dc77b 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -642,82 +642,6 @@ maybe_set_unchanging (ref, t)
|| TREE_CODE_CLASS (TREE_CODE (t)) == 'c')
RTX_UNCHANGING_P (ref) = 1;
}
-
-/* Given REF, a MEM, and T, either the type of X or the expression
- corresponding to REF, set the memory attributes. OBJECTP is nonzero
- if we are making a new object of this type. */
-
-void
-set_mem_attributes (ref, t, objectp)
- rtx ref;
- tree t;
- int objectp;
-{
- tree type;
-
- /* It can happen that type_for_mode was given a mode for which there
- is no language-level type. In which case it returns NULL, which
- we can see here. */
- if (t == NULL_TREE)
- return;
-
- type = TYPE_P (t) ? t : TREE_TYPE (t);
-
- /* Get the alias set from the expression or type (perhaps using a
- front-end routine) and then copy bits from the type. */
-
- /* It is incorrect to set RTX_UNCHANGING_P from TREE_READONLY (type)
- here, because, in C and C++, the fact that a location is accessed
- through a const expression does not mean that the value there can
- never change. */
-
- /* If we have already set DECL_RTL = ref, get_alias_set will get the
- wrong answer, as it assumes that DECL_RTL already has the right alias
- info. Callers should not set DECL_RTL until after the call to
- set_mem_attributes. */
- if (DECL_P (t) && ref == DECL_RTL_IF_SET (t))
- abort ();
-
- set_mem_alias_set (ref, get_alias_set (t));
-
- MEM_VOLATILE_P (ref) = TYPE_VOLATILE (type);
- MEM_IN_STRUCT_P (ref) = AGGREGATE_TYPE_P (type);
-
- /* If we are making an object of this type, we know that it is a scalar if
- the type is not an aggregate. */
- if (objectp && ! AGGREGATE_TYPE_P (type))
- MEM_SCALAR_P (ref) = 1;
-
- /* If T is a type, this is all we can do. Otherwise, we may be able
- to deduce some more information about the expression. */
- if (TYPE_P (t))
- return;
-
- maybe_set_unchanging (ref, t);
- if (TREE_THIS_VOLATILE (t))
- MEM_VOLATILE_P (ref) = 1;
-
- /* Now see if we can say more about whether it's an aggregate or
- scalar. If we already know it's an aggregate, don't bother. */
- if (MEM_IN_STRUCT_P (ref))
- return;
-
- /* Now remove any NOPs: they don't change what the underlying object is.
- Likewise for SAVE_EXPR. */
- while (TREE_CODE (t) == NOP_EXPR || TREE_CODE (t) == CONVERT_EXPR
- || TREE_CODE (t) == NON_LVALUE_EXPR || TREE_CODE (t) == SAVE_EXPR)
- t = TREE_OPERAND (t, 0);
-
- /* Since we already know the type isn't an aggregate, if this is a decl,
- it must be a scalar. Or if it is a reference into an aggregate,
- this is part of an aggregate. Otherwise we don't know. */
- if (DECL_P (t))
- MEM_SCALAR_P (ref) = 1;
- else if (TREE_CODE (t) == COMPONENT_REF || TREE_CODE (t) == ARRAY_REF
- || TREE_CODE (t) == ARRAY_RANGE_REF
- || TREE_CODE (t) == BIT_FIELD_REF)
- MEM_IN_STRUCT_P (ref) = 1;
-}
/* Return a modified copy of X with its memory address copied
into a temporary register to protect it from side effects.