This is the mail archive of the gcc-patches@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: PATCH for bogus loop optimization



  In message <199809300436.VAA30476@smtp.earthlink.net>you write:
  > Because n has its address taken, we turn n's REG into a 
  > MEM (ADDRESSOF (REG)).  Unfortunately, the original REG has
  > REG_USERVAR_P set, while the new REG (embedded in the ADDRESSOF) does
  > not.  Since the address of n is not really needed, we remove the 
  > ADDRESSOF bit after CSE.  That leaves a REG, just as if `n' had not
  > been addressed, but without REG_USERVAR_P set.  That causes scan_loop
  > to assume that there is only one set for n, and that it comes before
  > any use of n, but this is false.  The following patch fixes the bug by
  > making sure that the REG embedded in the ADDRESSOF has REG_USERVAR_P
  > set if the original REG does.
  > 
  > Would one of the maintainers care to approve this patch?
  > 
  > -- 
  > Mark Mitchell 			mark@markmitchell.com
  > Mark Mitchell Consulting	http://www.markmitchell.com
  > 
  > Tue Sep 29 21:27:17 1998  Mark Mitchell  <mark@markmitchell.com>
  > 
  > 	* function.c (gen_mem_addressof): If the address REG is
  > 	REG_USERVAR_P make the new REG be so also.
  > 	* loop.c (scan_loop): Apply DeMorgan's laws and add documentation
  > 	in an attempt to clarify slightly.
This is fine.  Thanks!

jeff


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