This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [ira] Move the init_ira call


Richard Sandiford wrote:
MIPS is, as yet, the only port to use backend_reinit.  As it stands,
backend_reinit calls init_ira before init_optabs, but the former
depends on the latter.

The problem is that optabs uses decls, so is initialised as part of
lang_dependent_init_target.  But init_ira is not language-dependent,
so is (sensibly enough) called from backend_init_target instead.

The same problem already applies to init_set_costs.  The approach
taken by the authors of the backend_reinit patch was to call
init_set_costs from lang_dependent_init_target, with the comment:

  /* Although the actions of init_set_costs are language-independent,
     it uses optabs, so we cannot call it from backend_init.  */

This patch does the same for init_ira too.

Tested on the WIP MIPS IRA port, where it fixes some gcc.target/mips
failures.  OK to install?

Thanks, Richard. The patch is ok for me. Please commit the patch.


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