This is the mail archive of the
mailing list for the GCC project.
Re: regmove patch
- To: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Subject: Re: regmove patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 18 Aug 1998 10:30:12 -0600
- cc: meissner at cygnus dot com, amylaar at cygnus dot com, gcc-local at cygnus dot com, egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199808181142.MAA14020@phal.cygnus.co.uk>you write:
> > The patch is pretty simple, we update REG_LIVE_LENGTH and REG_N_CALLS_CROSSED
> > when we make a successful substitution.
> You have removed the adjustment of REG_N_REFS for dregno.
Thanks for the catch. I'll fix that.
Note that REG_N_REFS is recomputed after regmove, so missing it should
not cause problems -- one of the things I'd like to do post-1.1 is
remove the code to try and keep REG_N_REFS up-to-date in regmove.c
since the code is basically useless.
> Otherwise, it seems OK.
> However, I thionk we would better code if we undo the initial substitution
> if we can't make a proper replacement. If we made validate_replace_rtx_1
> non-static, or created another interface function for it that doesn't
> call apply_change_group, that should be pretty straingtforward, and actually
> make optimize_reg_copy_1 simpler.
I would expect the number of cases where we later find that we can't
make a proper replacement to be small. This particular case happens
because we have a volatile memory reference.
But if you want to investigate and do this in the mainline sources