This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Autoincrement examples
- To: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>
- Subject: Re: Autoincrement examples
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 23 Nov 1999 00:41:17 -0700
- cc: Joern Rennecke <amylaar at cygnus dot co dot uk>, gcc at gcc dot gnu dot org, amylaar at cygnus dot com
- Reply-To: law at cygnus dot com
In message <14388.56414.788032.326677@ongaonga.elec.canterbury.ac.nz>you writ
e:
> > - By processing each register separately, you miss register-register
> > copies and three-address adds. Optimizing code with such constructs
> > was actually the main objective of my patch. It actually reduces
> > register pressure.
>
> I have rarely found these cases to be important for autoinc address
> generation. However, reduction of register pressure is a good thing.
I am somewhat surprised that that this isn't caught by cases B, C & E, at
least in limited forms.
Maybe Joern could provide some testcases for the 3-address problems.
> With the information that I collect, these transformations would be
> straightforward. More importantly, I would like to reorder some of
> the memory references to improve autoinc generation.
>
> Does your code maintain the LOG_LINKS? If so I would like to try
> running the instruction combiner after the regmove pass.
> Alternatively, could your code be easily modified to remove redundant
> load instructions once an autoinc address was generated?
My gut tells me that this is a mistake. Though I'm also wondering if regmove
should be re-cast using a conflict/adjacency list. But that's a topic for
another discussion.
While I realize there are optimization opportunities you're missing you're
talking about a fairly significant amount of work for what is likely to be
marginal benefit.
jeff