From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32423 invoked by alias); 31 Oct 2013 16:27:28 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 32295 invoked by uid 89); 31 Oct 2013 16:27:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 31 Oct 2013 16:27:25 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbv5Z-0001ru-F8 for gcc-patches@gcc.gnu.org; Thu, 31 Oct 2013 12:27:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41282) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbv5Z-0001rm-6U for gcc-patches@gcc.gnu.org; Thu, 31 Oct 2013 12:27:17 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9VGRFrk025085 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 31 Oct 2013 12:27:16 -0400 Received: from surprise.bos.redhat.com ([10.18.25.13]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r9VGRCmT021743; Thu, 31 Oct 2013 12:27:15 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org, Andrew MacLeod Cc: David Malcolm Subject: [PATCH 4/6] Implement is_a_helper <>::test specializations for various gimple types Date: Thu, 31 Oct 2013 16:27:00 -0000 Message-Id: <1383236801-13234-5-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1383236801-13234-1-git-send-email-dmalcolm@redhat.com> References: <5271CBF9.2070005@redhat.com> <1383236801-13234-1-git-send-email-dmalcolm@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg02705.txt.bz2 * gimple.h (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): New. (is_a_helper ::test): New. --- gcc/gimple.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gcc/gimple.h b/gcc/gimple.h index f258992..710ce04 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1756,6 +1756,21 @@ gimple_has_ops (const_gimple g) return gimple_code (g) >= GIMPLE_COND && gimple_code (g) <= GIMPLE_RETURN; } +template <> +template <> +inline bool +is_a_helper ::test (const_gimple gs) +{ + return gimple_has_ops (gs); +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) +{ + return gimple_has_ops (gs); +} /* Return true if GIMPLE statement G has memory operands. */ @@ -1765,6 +1780,21 @@ gimple_has_mem_ops (const_gimple g) return gimple_code (g) >= GIMPLE_ASSIGN && gimple_code (g) <= GIMPLE_RETURN; } +template <> +template <> +inline bool +is_a_helper ::test (const_gimple gs) +{ + return gimple_has_mem_ops (gs); +} + +template <> +template <> +inline bool +is_a_helper ::test (gimple gs) +{ + return gimple_has_mem_ops (gs); +} /* Return the set of USE operands for statement G. */ -- 1.7.11.7