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

  > 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


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