This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Propagation of pointer alignment information



  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?
  > 
  > <date>  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]