From: Claudiu Zissulescu Date: Mon, 10 Oct 2016 11:39:22 +0000 (+0200) Subject: [ARC] Disable compact casesi patterns for arcv2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=30102051a53033464e4eff65fcfb7aafd45e9f1a;p=gcc.git [ARC] Disable compact casesi patterns for arcv2 gcc/ 2016-05-09 Claudiu Zissulescu * common/config/arc/arc-common.c (arc_option_optimization_table): Remove compact casesi option. * config/arc/arc.c (arc_override_options): Use compact casesi option only for pre-ARCv2 cores. * doc/invoke.texi (mcompact-casesi): Update text. From-SVN: r240916 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7842655c79a..6810f199dc0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-10-10 Claudiu Zissulescu + + * common/config/arc/arc-common.c (arc_option_optimization_table): + Remove compact casesi option. + * config/arc/arc.c (arc_override_options): Use compact casesi + option only for pre-ARCv2 cores. + * doc/invoke.texi (mcompact-casesi): Update text. + 2016-10-09 Aaron Sawdey * config/rs6000/rs6000.h (TARGET_EFFICIENT_OVERLAPPING_UNALIGNED): diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c index f5b9c6d3cc9..5b687fb16ad 100644 --- a/gcc/common/config/arc/arc-common.c +++ b/gcc/common/config/arc/arc-common.c @@ -56,7 +56,6 @@ static const struct default_options arc_option_optimization_table[] = { OPT_LEVELS_ALL, OPT_mbbit_peephole, NULL, 1 }, { OPT_LEVELS_SIZE, OPT_mq_class, NULL, 1 }, { OPT_LEVELS_SIZE, OPT_mcase_vector_pcrel, NULL, 1 }, - { OPT_LEVELS_SIZE, OPT_mcompact_casesi, NULL, 1 }, { OPT_LEVELS_NONE, 0, NULL, 0 } }; diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 2b25b0b737a..5e8d6b4209d 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -858,6 +858,17 @@ arc_override_options (void) if (arc_size_opt_level == 3) optimize_size = 1; + /* Compact casesi is not a valid option for ARCv2 family. */ + if (TARGET_V2 + && TARGET_COMPACT_CASESI) + { + warning (0, "compact-casesi is not applicable to ARCv2"); + TARGET_COMPACT_CASESI = 0; + } + else if (optimize_size == 1 + && !global_options_set.x_TARGET_COMPACT_CASESI) + TARGET_COMPACT_CASESI = 1; + if (flag_pic) target_flags |= MASK_NO_SDATA_SET; diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b7a32b663ac..3f9c0a07be0 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -14293,8 +14293,8 @@ This is the default for @option{-Os}. @item -mcompact-casesi @opindex mcompact-casesi -Enable compact casesi pattern. -This is the default for @option{-Os}. +Enable compact casesi pattern. This is the default for @option{-Os}, +and only available for ARCv1 cores. @item -mno-cond-exec @opindex mno-cond-exec