Commit 30102051 by Claudiu Zissulescu Committed by Claudiu Zissulescu

[ARC] Disable compact casesi patterns for arcv2

gcc/
2016-05-09  Claudiu Zissulescu  <claziss@synopsys.com>

	* 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
parent 41683e1a
2016-10-10 Claudiu Zissulescu <claziss@synopsys.com>
* 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 <acsawdey@linux.vnet.ibm.com> 2016-10-09 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
* config/rs6000/rs6000.h (TARGET_EFFICIENT_OVERLAPPING_UNALIGNED): * config/rs6000/rs6000.h (TARGET_EFFICIENT_OVERLAPPING_UNALIGNED):
......
...@@ -56,7 +56,6 @@ static const struct default_options arc_option_optimization_table[] = ...@@ -56,7 +56,6 @@ static const struct default_options arc_option_optimization_table[] =
{ OPT_LEVELS_ALL, OPT_mbbit_peephole, NULL, 1 }, { OPT_LEVELS_ALL, OPT_mbbit_peephole, NULL, 1 },
{ OPT_LEVELS_SIZE, OPT_mq_class, NULL, 1 }, { OPT_LEVELS_SIZE, OPT_mq_class, NULL, 1 },
{ OPT_LEVELS_SIZE, OPT_mcase_vector_pcrel, 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 } { OPT_LEVELS_NONE, 0, NULL, 0 }
}; };
......
...@@ -858,6 +858,17 @@ arc_override_options (void) ...@@ -858,6 +858,17 @@ arc_override_options (void)
if (arc_size_opt_level == 3) if (arc_size_opt_level == 3)
optimize_size = 1; 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) if (flag_pic)
target_flags |= MASK_NO_SDATA_SET; target_flags |= MASK_NO_SDATA_SET;
......
...@@ -14293,8 +14293,8 @@ This is the default for @option{-Os}. ...@@ -14293,8 +14293,8 @@ This is the default for @option{-Os}.
@item -mcompact-casesi @item -mcompact-casesi
@opindex mcompact-casesi @opindex mcompact-casesi
Enable compact casesi pattern. Enable compact casesi pattern. This is the default for @option{-Os},
This is the default for @option{-Os}. and only available for ARCv1 cores.
@item -mno-cond-exec @item -mno-cond-exec
@opindex mno-cond-exec @opindex mno-cond-exec
......
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