public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: marxin <mliska@suse.cz>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 1/4] Replace ENABLE_CHECKING macro with flag_checking in HSA
Date: Thu, 25 Feb 2016 15:35:00 -0000	[thread overview]
Message-ID: <72723331ee9c98cde2389c110e20cac6c08a631c.1456409352.git.mliska@suse.cz> (raw)
In-Reply-To: <cover.1456409352.git.mliska@suse.cz>

gcc/ChangeLog:

2016-02-24  Martin Liska  <mliska@suse.cz>

	* hsa-gen.c (generate_hsa): Replace ENABLE_CHECKING macro
	with flag_checking.
	* hsa-regalloc.c (linear_scan_regalloc): Likewise.
---
 gcc/hsa-gen.c      | 25 +++++++++++++------------
 gcc/hsa-regalloc.c |  7 +++----
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index 28e8b6f..8e2144c 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -6091,21 +6091,22 @@ generate_hsa (bool kernel)
 				 s->m_gridified_kernel_p);
     }
 
-#ifdef ENABLE_CHECKING
-  for (unsigned i = 0; i < hsa_cfun->m_ssa_map.length (); i++)
-    if (hsa_cfun->m_ssa_map[i])
-      hsa_cfun->m_ssa_map[i]->verify_ssa ();
-
-  basic_block bb;
-  FOR_EACH_BB_FN (bb, cfun)
+  if (flag_checking)
     {
-      hsa_bb *hbb = hsa_bb_for_bb (bb);
+      for (unsigned i = 0; i < hsa_cfun->m_ssa_map.length (); i++)
+	if (hsa_cfun->m_ssa_map[i])
+	  hsa_cfun->m_ssa_map[i]->verify_ssa ();
 
-      for (hsa_insn_basic *insn = hbb->m_first_insn; insn; insn = insn->m_next)
-	insn->verify ();
-    }
+      basic_block bb;
+      FOR_EACH_BB_FN (bb, cfun)
+	{
+	  hsa_bb *hbb = hsa_bb_for_bb (bb);
 
-#endif
+	  for (hsa_insn_basic *insn = hbb->m_first_insn; insn;
+	       insn = insn->m_next)
+	    insn->verify ();
+	}
+    }
 
   hsa_regalloc ();
   hsa_brig_emit_function ();
diff --git a/gcc/hsa-regalloc.c b/gcc/hsa-regalloc.c
index f8e83ecf..9437132 100644
--- a/gcc/hsa-regalloc.c
+++ b/gcc/hsa-regalloc.c
@@ -580,10 +580,9 @@ linear_scan_regalloc (struct m_reg_class_desc *classes)
   /* Sort all intervals by increasing start point.  */
   gcc_assert (ind2reg.length () == (size_t) hsa_cfun->m_reg_count);
 
-#ifdef ENABLE_CHECKING
-  for (unsigned i = 0; i < ind2reg.length (); i++)
-    gcc_assert (ind2reg[i]);
-#endif
+  if (flag_checking)
+    for (unsigned i = 0; i < ind2reg.length (); i++)
+      gcc_assert (ind2reg[i]);
 
   ind2reg.qsort (cmp_begin);
   for (i = 0; i < 4; i++)
-- 
2.7.0


  reply	other threads:[~2016-02-25 15:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 15:35 [PATCH 0/4] Replace remaining ENABLE_CHECKING macros marxin
2016-02-25 15:35 ` marxin [this message]
2016-02-25 17:18   ` [PATCH 1/4] Replace ENABLE_CHECKING macro with flag_checking in HSA Martin Jambor
2016-02-25 15:35 ` [PATCH 2/4] Replace ENABLE_CHECKING macro with flag_checking in GNAT marxin
2016-02-26 21:28   ` Jeff Law
2016-02-25 15:35 ` [PATCH 4/4] Poison ENABLE_CHECKING macro marxin
2016-02-26 10:43   ` Richard Biener
2016-02-25 15:35 ` [PATCH 3/4] Replace ENABLE_CHECKING with CHECKING_P in dwarf2out marxin
2016-02-26 10:43   ` Richard Biener

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=72723331ee9c98cde2389c110e20cac6c08a631c.1456409352.git.mliska@suse.cz \
    --to=mliska@suse.cz \
    --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).