[rfc] Make regrename call recog

Richard Earnshaw rearnsha@gcc.gnu.org
Thu Aug 25 14:53:00 GMT 2005


On Thu, 2005-08-25 at 15:05, Bernd Schmidt wrote:
> > working on a S/390 patch optimizing load/store multiple I've
> > noticed that regrename replaces registers without calling
> > recog afterwards. So it happened that a single register out
> > of a PARALLEL block of SETs gets renamed. Because the
> > load_multiple patterns only accept SETs with consecutive
> > registers this insn is invalid after regrename.
> > 
> > The attached patch turns "do_replace" in "try_replace" using
> > validate_change to replace the register along the def-use chain.
> 
> IIRC the ARM used to have a similar problem.

regrename won't replace a register if the constraint string is empty. 
Otherwise it will consider any register that matches the constraint to
be a valid replacement.

R.



More information about the Gcc-patches mailing list