public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>
To: <gcc-patches@gcc.gnu.org>, <andrew.burgess@embecosm.com>
Cc: <Claudiu.Zissulescu@synopsys.com>
Subject: Re:[PATCH] [ARC] Disable compact casesi patterns for arcv2
Date: Fri, 30 Sep 2016 14:36:00 -0000	[thread overview]
Message-ID: <1475243523-12183-1-git-send-email-claziss@synopsys.com> (raw)
In-Reply-To: <20160929192616.GF18222@embecosm.com>

Please find the updated patch,
Claudiu

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.
---
 gcc/common/config/arc/arc-common.c |  1 -
 gcc/config/arc/arc.c               | 11 +++++++++++
 gcc/doc/invoke.texi                |  4 ++--
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c
index f5b9c6d..5b687fb 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 2b25b0b..5e8d6b4 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 6767462..05f565d 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -14255,8 +14255,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
-- 
1.9.1

  parent reply	other threads:[~2016-09-30 13:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-26 11:30 [PATCH] [ARC] Fix emitting jump tables for ARCv2 Claudiu Zissulescu
2016-06-15  7:07 ` Claudiu Zissulescu
2016-09-27 14:57 ` Andrew Burgess
2016-09-28  9:28   ` Claudiu Zissulescu
2016-09-29  9:00   ` [PATCH] Disable compact casesi patterns for arcv2 Claudiu Zissulescu
2016-09-29 19:45     ` Andrew Burgess
2016-09-30  8:43       ` Claudiu Zissulescu
2016-09-30 14:36       ` Claudiu Zissulescu [this message]
2016-10-06 23:08         ` [PATCH] [ARC] " Andrew Burgess
2016-10-10 11:42           ` Claudiu Zissulescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475243523-12183-1-git-send-email-claziss@synopsys.com \
    --to=claudiu.zissulescu@synopsys.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).