This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
MInor improvement in mem alignment tracking
- To: gcc-patches at gcc dot gnu dot org
- Subject: MInor improvement in mem alignment tracking
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Fri, 9 Nov 01 17:55:43 EST
Tested on alphaev56-dec-osf4.0c.
Fri Nov 9 17:51:09 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* emit-rtl.c (set_mem_attributes): Get alignments for constants.
*** emit-rtl.c 2001/11/06 21:12:07 1.221
--- emit-rtl.c 2001/11/09 22:40:28
*************** set_mem_attributes (ref, t, objectp)
*** 1737,1740 ****
--- 1737,1749 ----
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
+ }
}