From patchwork Thu Aug 29 16:20:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 270879 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "www.sourceware.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 95B132C00B1 for ; Fri, 30 Aug 2013 02:21:35 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=dexLZKxGUFe+2DChoPseBbONZWvilXdXLGcPJYBtntGOK9S9W/C/h vgO2yI+FgewUFfJA0VdL8PxzUHo+atpRJbSeRM21w80ALOztnea/gCPEUMTXz/66 wzO+1ysfZdZR2QRcO2q9TSA7MC55tP3IpTy/36/gjRkvMLA2/JgAiA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=XtcJ3kz5B3R4Cvcq4uAIg6vNlf4=; b=GRe4rV9c0m1Of4DZ/i4y kx32RPmGYLa3Pfpb3ihjHIWgyY0TQizvUOjeKLhq1W2yV9VWsXwGeY7z/fQoh+Pz kX9rIf6yNuvjUgYSlVpm32kOvhtCJRSXhtdpNsC1KdiwQxVGI6vQ1bLMpnbB89Yt omrKwPeIzkT9l5WvblrECP8= Received: (qmail 25269 invoked by alias); 29 Aug 2013 16:20:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 25242 invoked by uid 89); 29 Aug 2013 16:20:41 -0000 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, 29 Aug 2013 16:20:41 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-7.1 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VF4xS-00061E-07 for gcc-patches@gcc.gnu.org; Thu, 29 Aug 2013 12:20:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VF4xR-00060o-Gp for gcc-patches@gcc.gnu.org; Thu, 29 Aug 2013 12:20:29 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7TGKRct020284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 29 Aug 2013 12:20:28 -0400 Received: from surprise.bos.redhat.com ([10.18.25.132]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r7TGKOIT013271; Thu, 29 Aug 2013 12:20:26 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [PATCH 4/6] Implement is_a_helper <>::test specializations for various gimple types Date: Thu, 29 Aug 2013 12:20:14 -0400 Message-Id: <1377793216-22549-5-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1377793216-22549-1-git-send-email-dmalcolm@redhat.com> References: <1377793216-22549-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 * 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 43573a1..e2cd383 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -1722,6 +1722,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. */ @@ -1731,6 +1746,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. */