From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeffrey A Law To: richard.earnshaw@arm.com Cc: Joern Rennecke , egcs@egcs.cygnus.com Subject: Re: Propagation of pointer alignment information Date: Wed, 16 Dec 1998 22:07:00 -0000 Message-id: <29262.913874805@hurl.cygnus.com> References: <199812161354.NAA04076@sun52.NIS.cambridge> X-SW-Source: 1998-12/msg00623.html In message < 199812161354.NAA04076@sun52.NIS.cambridge >you write: > This makes sense, but taking that route, I think it then makes sense when > the flag is unset to then turn off all alignment assumptions that are > inferred via REGNO_POINTER_ALIGN. The patch below does this. > > Jeff, is the following patch OK to install? > > Richard Earnshaw (rearnsha@arm.com) > > * toplev.c (flag_infer_align): New flag. > (lang_independent_options): Add -finfer-align to list of flags. > (main): Turn it on when optimizing. > * flags.h (flag_infer_align): Declare it. > * emit-rtl.c (mark_reg_pointer): Only set REGNO_POINTER_ALIGN if > flag_infer_align. > (init_emit): Note that alignments of stack and frame regs are well > known, even if flag_infer_align is unset. > * invoke.texi: Document -finfer-align. Implementation seems fine. I'm not a big fan of having lots of options to work around bad user code. I'm willing to go along with this patch if you think this problem is important enough to warrant adding the change. But we shouldn't make a habit of hacking the compiler to work around bugs in user code. jeff