diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-12 10:21:09 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-12 10:21:09 +0000 |
commit | ecfe4ca99acd5678d41375c7e38a51d97c7499b6 (patch) | |
tree | 76fe196dc449b540f0ebdef99b27c045fe8a8b3e /gcc | |
parent | 3de3017829316cfd4fb97f0d8161eda1fb8e909e (diff) | |
download | gcc-ecfe4ca99acd5678d41375c7e38a51d97c7499b6.tar.gz |
* emit-rtl.c (set_mem_attributes): If making object, can set alignment
from type.
(replace_equiv_address): Call update_temp_slot_address.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46940 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e83c85800a..4702f7e48ea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ Mon Nov 12 05:18:42 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + * emit-rtl.c (set_mem_attributes): If making object, can set alignment + from type. + (replace_equiv_address): Call update_temp_slot_address. + * dwarf2out.c (loc_descriptor_from_tree, case COMPOUND_EXPR): New case. * alias.c (nonoverlapping_memrefs_p): Handle DECL_RTL being a CONCAT. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 9242e790d3d..73307ecab28 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1699,6 +1699,11 @@ set_mem_attributes (ref, t, objectp) if ((objectp || DECL_P (t)) && ! AGGREGATE_TYPE_P (type)) MEM_SCALAR_P (ref) = 1; + /* We can set the alignment from the type if we are makign an object or + if this is an INDIRECT_REF. */ + if (objectp || TREE_CODE (t) == INDIRECT_REF) + align = TYPE_ALIGN (type); + /* If the size is known, we can set that. */ if (TYPE_SIZE_UNIT (type) && host_integerp (TYPE_SIZE_UNIT (type), 1)) size = GEN_INT (tree_low_cst (TYPE_SIZE_UNIT (type), 1)); @@ -1733,11 +1738,7 @@ set_mem_attributes (ref, t, objectp) align = DECL_ALIGN (t); } - /* If this is an INDIRECT_REF, we know its alignment. */ - else if (TREE_CODE (t) == INDIRECT_REF) - align = TYPE_ALIGN (type); - - /* Likewise for constants. */ + /* If this is a constant, we know the alignment. */ else if (TREE_CODE_CLASS (TREE_CODE (t)) == 'c') { align = TYPE_ALIGN (type); @@ -1961,6 +1962,7 @@ replace_equiv_address (memref, addr) { /* change_address_1 copies the memory attribute structure without change and that's exactly what we want here. */ + update_temp_slot_address (XEXP (memref, 0), addr); return change_address_1 (memref, VOIDmode, addr, 1); } |