Move static array from header to .c file (fixed increased memory usage bs-45) 74/129074/4 accepted/tizen/base/20170519.201131 submit/tizen_base/20170518.085959 tizen_4.0.m1_release
authorMikhail Kashkarov <m.kashkarov@partner.samsung.com>
Wed, 10 May 2017 09:58:52 +0000 (12:58 +0300)
committerMikhail Kashkarov <m.kashkarov@partner.samsung.com>
Tue, 16 May 2017 09:12:20 +0000 (12:12 +0300)
Please, remove this commit when merging c1cb342.

        gcc/
        * config/arm/arm-opts.h: Move struct arm_arch_core_flag and
        static array arm_arch_core_flags to...
        * common/config/arm/arm-common.c: There.

Change-Id: Id71ddb5deac5372791b63f9bf03852e661477bf4

gcc/common/config/arm/arm-common.c
gcc/config/arm/arm-opts.h

index 29ae0c3..1cb59aa 100644 (file)
@@ -97,6 +97,26 @@ arm_rewrite_mcpu (int argc, const char **argv)
   return arm_rewrite_selected_cpu (argv[argc - 1]);
 }
 
+struct arm_arch_core_flag
+{
+  const char *const name;
+  const arm_feature_set flags;
+};
+
+static const struct arm_arch_core_flag arm_arch_core_flags[] =
+{
+#undef ARM_CORE
+#define ARM_CORE(NAME, X, IDENT, ARCH, FLAGS, COSTS) \
+  {NAME, FLAGS},
+#include "config/arm/arm-cores.def"
+#undef ARM_CORE
+#undef ARM_ARCH
+#define ARM_ARCH(NAME, CORE, ARCH, FLAGS) \
+  {NAME, FLAGS},
+#include "config/arm/arm-arches.def"
+#undef ARM_ARCH
+};
+
 /* Called by the driver to check whether the target denoted by current
    command line options is a Thumb-only target.  ARGV is an array of
    -march and -mcpu values (ie. it contains the rhs after the equal
index 9ae104a..84669f4 100644 (file)
@@ -80,23 +80,4 @@ enum arm_tls_type {
   TLS_GNU2
 };
 
-struct arm_arch_core_flag
-{
-  const char *const name;
-  const arm_feature_set flags;
-};
-
-static const struct arm_arch_core_flag arm_arch_core_flags[] =
-{
-#undef ARM_CORE
-#define ARM_CORE(NAME, X, IDENT, ARCH, FLAGS, COSTS) \
-  {NAME, FLAGS},
-#include "arm-cores.def"
-#undef ARM_CORE
-#undef ARM_ARCH
-#define ARM_ARCH(NAME, CORE, ARCH, FLAGS) \
-  {NAME, FLAGS},
-#include "arm-arches.def"
-#undef ARM_ARCH
-};
 #endif