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]

patch for PR65862


The following patch is for solution of PR65862

   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65862

In some cases, calculations of reg class costs are not enough to choose the right class. For example, in some cases you don't want to start fp unit for energy saving considerations if you don't really need it. Such case can occur when we have non-floating point mode pseudo and calculation costs in ira says that it would be profitable to put it in a floating point register.

The full solution will need to add a hook to mips.c. I hope mips maintainers will do that soon.

The patch was bootstrapped on x86-64.

Committed as rev. 223202.

2015-05-14  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/65862
        * target.def (ira_change_pseudo_allocno_class): New hook.
        * targhooks.c (default_ira_change_pseudo_allocno_class): Default
        value of the hook.
        * targhooks.h (default_ira_change_pseudo_allocno_class): New
        extern
        * doc/tm.texi.in (TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS): Add the
        hook.
        * ira-costs.c (find_costs_and_classes): Call the hook and change
        classes when it is necessary.
        * doc/tm.texi: Update.



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