[ira] Move the init_ira call

Vladimir Makarov vmakarov@redhat.com
Fri May 9 17:47:00 GMT 2008


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.



More information about the Gcc-patches mailing list