This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Autoincrement examples


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]