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: reload_in_progress || reload_completed


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

I've just searched the .texi files.  They contain precisely one reference 
to
gen_reg_rtx:

  If a scratch register is required to move an object to or from memory,
  it can be allocated using @code{gen_reg_rtx} prior to reload.

No mention of flow analysis.




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