This is the mail archive of the
mailing list for the GCC project.
Re: PATCH for bogus loop optimization
- To: mark at markmitchell dot com
- Subject: Re: PATCH for bogus loop optimization
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 30 Sep 1998 01:47:06 -0600
- cc: Corey Kosak <kosak at cs dot cmu dot edu>, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
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 firstname.lastname@example.org
> Mark Mitchell Consulting http://www.markmitchell.com
> Tue Sep 29 21:27:17 1998 Mark Mitchell <email@example.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!