This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: loop optimizer naivety
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: law at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 23 Sep 2003 10:29:33 +0200
- Subject: Re: loop optimizer naivety
- References: <200309230753.h8N7r6EK019080@speedy.slc.redhat.com>
> I would speculate that after PRE/LCM was completed that insn 610
> referenced reg 185 rather than 173. ie, the code looked something like
> this:
> [...]
> Then copy-prop replaced reg 185 with reg 173 in insn 610, which
> leads to the somewhat odd looking code in your message.
That's indeed what happens.
> If you could verify that sequence of events it would be helpful in at
> least determining that LCM is operating properly. To do this you'd put
> a breakpoint just before this hunk of code in gcse.c and dump the RTL
> to a file:
The log file is sufficient I think:
PRE: store updated with reaching reg (reg:SI 185):
(insn 610 609 765 3 0x40a5565c (set (mem/f:SI (plus:SI (reg/f:SI 20 frame)
(const_int -100 [0xffffff9c])) [5 S4 A32])
(reg:SI 173)) 38 {*movsi_1} (nil)
(expr_list:REG_EQUAL (plus:SI (reg:SI 161)
(const_int 1 [0x1]))
(nil)))
LOCAL COPY-PROP: Replacing reg 185 in insn 610 with reg 173
--
Eric Botcazou