This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: reload_in_progress || reload_completed
- To: Jakub Jelinek <jj at sunsite dot ms dot mff dot cuni dot cz>
- Subject: Re: reload_in_progress || reload_completed
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 24 Nov 1998 11:08:32 -0700
- cc: egcs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199811141546.QAA18263@sunsite.ms.mff.cuni.cz>you write:
> Hi!
>
> It seems most ports use a construct in many places where
> if (reload_in_progress || reload_completed)
> rtx = something;
> else
> rtx = gen_reg_rtx(mode);
>
> but gen_reg_rtx is not valid after life_analysis already, so there is a
> window where those two variables are not yet set, but the code will attempt
> to get a new pseudo.
New pseudos can not be created after the first life analysis pass has run which
gives us a fairly large window where this approximation loses. We should fix
code which makes this mistake. It's unfortunately a common mistake (I know
I've made it a few times).
> pseudos at that time already? Or should we introduce some new variable like
> reload_in_progress, reload_completed, cse_not_expected etc., which would
> mean it is not possible to generate new pseudos?
I think this would be wise. no_new_pseudos or whatever. Set it immediately
before/after the first life analysis pass (not sure if life1 will try to create
new pseudos or not).
jeff