This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Autoincrement examples
- To: m dot hayes at elec dot canterbury dot ac dot nz (Michael Hayes)
- Subject: Re: Autoincrement examples
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Sat, 20 Nov 1999 17:01:41 +0000 (GMT)
- Cc: amylaar at cygnus dot co dot uk, m dot hayes at elec dot canterbury dot ac dot nz, law at cygnus dot com, gcc at gcc dot gnu dot org, amylaar at cygnus dot com
> The instruction combiner may then convert this into:
...
> (set (reg u) (mult (mem (post_inc (reg a))) (mem (post_inc (reg b)))))
> (set (reg v) (plus (reg v) (reg u)))
...
> Now if autoinc generation takes place after instruction combination we
> end up with the following that exhibits load instructions that could
> be optimised away:
...
> (set (reg s) (mem (post_inc (reg a))))
> (set (reg t) (mem (post_inc (reg b))))
> (set (reg u) (mult (reg s) (reg t)))
> (set (reg v) (plus (reg v) (reg u)))
Oh. So you are not actually talking about dead loads, but loads that could
be combined into thev instruction that uses the loaded value.
This optimization opportunity seems to be due to a peculiarity of your
target architecture - not being a true load-store one, but allowing different
sets of addressing modes in different instructions.
Indeed, it seems that it seems best to let combine do this job.
Updating LOG_LINKS seems tedious, but not intrincically hard to do.
Just time-consuming to code.