Commit 74e32076 by Yao Qi Committed by Yao Qi

arm.c (arm_preferred_rename_class): Implement targethook PREFERRED_RENAME_CLASS.

2010-12-09  Yao Qi  <yao@codesourcery.com>

        * config/arm/arm.c (arm_preferred_rename_class): Implement targethook
        PREFERRED_RENAME_CLASS.

From-SVN: r167626
parent ad632e98
2010-12-09 Yao Qi <yao@codesourcery.com>
* config/arm/arm.c (arm_preferred_rename_class): Implement targethook
PREFERRED_RENAME_CLASS.
2010-12-08 Ian Lance Taylor <iant@google.com> 2010-12-08 Ian Lance Taylor <iant@google.com>
* doc/sourcebuild.texi (Front End): Remove reference to * doc/sourcebuild.texi (Front End): Remove reference to
...@@ -248,6 +248,7 @@ static bool arm_builtin_support_vector_misalignment (enum machine_mode mode, ...@@ -248,6 +248,7 @@ static bool arm_builtin_support_vector_misalignment (enum machine_mode mode,
int misalignment, int misalignment,
bool is_packed); bool is_packed);
static void arm_conditional_register_usage (void); static void arm_conditional_register_usage (void);
static reg_class_t arm_preferred_rename_class (reg_class_t class);
/* Table of machine attributes. */ /* Table of machine attributes. */
...@@ -585,6 +586,10 @@ static const struct default_options arm_option_optimization_table[] = ...@@ -585,6 +586,10 @@ static const struct default_options arm_option_optimization_table[] =
#define TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT \ #define TARGET_VECTORIZE_SUPPORT_VECTOR_MISALIGNMENT \
arm_builtin_support_vector_misalignment arm_builtin_support_vector_misalignment
#undef TARGET_PREFERRED_RENAME_CLASS
#define TARGET_PREFERRED_RENAME_CLASS \
arm_preferred_rename_class
struct gcc_target targetm = TARGET_INITIALIZER; struct gcc_target targetm = TARGET_INITIALIZER;
/* Obstack for minipool constant handling. */ /* Obstack for minipool constant handling. */
...@@ -23467,4 +23472,16 @@ arm_conditional_register_usage (void) ...@@ -23467,4 +23472,16 @@ arm_conditional_register_usage (void)
SUBTARGET_CONDITIONAL_REGISTER_USAGE SUBTARGET_CONDITIONAL_REGISTER_USAGE
} }
static reg_class_t
arm_preferred_rename_class (reg_class_t class)
{
/* Thumb-2 instructions using LO_REGS may be smaller than instructions
using GENERIC_REGS. During register rename pass, we prefer LO_REGS,
and code size can be reduced. */
if (TARGET_THUMB2 && class == GENERAL_REGS)
return LO_REGS;
else
return NO_REGS;
}
#include "gt-arm.h" #include "gt-arm.h"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment