This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Speedup CSE by 5%
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: bernds_cb1 at t-online dot de
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 27 Jan 05 09:19:11 EST
- Subject: Re: Speedup CSE by 5%
There are two possible reasons for the copy_rtx I can think of: either
fold_rtx destructively modifies its input (which I shouldn't happen
from what I can see), or we have RTL sharing issues. In the latter
case, we can postpone the copy until after we found that fold_rtx has
made a change.
I did a bit of archaeology; the call to copy_rtx was introduced as
part of a larger change by kenner in
http://savannah.gnu.org/cgi-bin/viewcvs/gcc/old-gcc/cse.c.diff?r1=1.165&r2=1.166
Kenner, any idea what it was for?
Nine years is a long time, but I'm pretty sure the the concern was RTL
sharing and the subsequent validate_change call. It's more likely that
this was put in as the result of running into a bug due to that sharing
than that it was done "by inspection" without running into such a bug,
but that's just a guess based on my practices at that point.