diff options
author | Richard Kenner <kenner@vlsi1.ultra.nyu.edu> | 2001-11-09 22:48:29 +0000 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2001-11-09 17:48:29 -0500 |
commit | 9ddfb1a75bece3f23c95c7d9ec0e8bbff3b1cb67 (patch) | |
tree | 0ab2012300f320dc949dfae6a396bdb6f0f9df78 /gcc | |
parent | 2473ee110ff4c7159e9db97aa15df313be56dbbd (diff) | |
download | gcc-9ddfb1a75bece3f23c95c7d9ec0e8bbff3b1cb67.zip gcc-9ddfb1a75bece3f23c95c7d9ec0e8bbff3b1cb67.tar.gz gcc-9ddfb1a75bece3f23c95c7d9ec0e8bbff3b1cb67.tar.bz2 |
* emit-rtl.c (set_mem_attributes): Get alignments for constants.
From-SVN: r46896
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 9 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 573cb92..59683bd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Fri Nov 9 17:51:09 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> + + * emit-rtl.c (set_mem_attributes): Get alignments for constants. + 2001-11-09 Aldy Hernandez <aldyh@redhat.com> * rs6000.h (REG_CLASS_CONTENTS): Add VRSAVE bit to ALL_REGS. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 9bbaee4..9242e79 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1736,6 +1736,15 @@ set_mem_attributes (ref, t, objectp) /* If this is an INDIRECT_REF, we know its alignment. */ else if (TREE_CODE (t) == INDIRECT_REF) align = TYPE_ALIGN (type); + + /* Likewise for constants. */ + else if (TREE_CODE_CLASS (TREE_CODE (t)) == 'c') + { + align = TYPE_ALIGN (type); +#ifdef CONSTANT_ALIGNMENT + align = CONSTANT_ALIGNMENT (t, align); +#endif + } } /* Now set the attributes we computed above. */ |