From patchwork Thu Dec 22 11:27:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prathamesh Kulkarni X-Patchwork-Id: 88843 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2752791qgi; Thu, 22 Dec 2016 03:28:07 -0800 (PST) X-Received: by 10.84.135.34 with SMTP id 31mr18305972pli.50.1482406087870; Thu, 22 Dec 2016 03:28:07 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 3si30513272plo.4.2016.12.22.03.28.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Dec 2016 03:28:07 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444968-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444968-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444968-patch=linaro.org@gcc.gnu.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=KTsxLpv4h64KWdIpzjHGtD0uCjxj+mtG/kDEQdpobinqNJ 8yMBnE87wHmszs6f2iG066vpCtSkR0t5J6zr4MK2zLp09XLWcfSa0od6f1A0Blie 4u2ySGJdkX+2vDJY2smoxFGFdG6ow18SEWpcDF23ZGwm4CAp+oRS71edXc9eM= 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 :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=TmUYYY5AKWKvY4unZZTc0y+GEU4=; b=KabLcjBEVw0gC+bE5Isj mv1wg0DgWugFivTwc9zdnYYRLW6DTwVuo51TSEGIKPHig3ld9DkS2bbZOk+b6SOc EaWLN6XzlCEpIoiKErdPDkyJl9gGR8dXhNKQxGinxXUkAAiH+hKfPuj93wegRRu7 NgKjv5CuOlqfXSFn3n8o6/4= Received: (qmail 30844 invoked by alias); 22 Dec 2016 11:27:52 -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 30832 invoked by uid 89); 22 Dec 2016 11:27:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2016 X-HELO: mail-it0-f47.google.com Received: from mail-it0-f47.google.com (HELO mail-it0-f47.google.com) (209.85.214.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Dec 2016 11:27:41 +0000 Received: by mail-it0-f47.google.com with SMTP id o141so55358202itc.0 for ; Thu, 22 Dec 2016 03:27:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=EU0pSy9uT8sCd5mlxZYMmLjBOFskmxyIrbjWlExYUFQ=; b=CW9Dho7gznXJstD0vMbUxkQYqNyin7aTvdvibrJwitl/b4oc9W6kkn8dP/iIBeSBiG VsM78i7Cbw+uG/Jb+rt5quYaKQuq03nR6pszQvBLVCBtPSIVgofUn+dGYbAsMrOiRHMt xTxq9qcU+qCK34TjKr8eP5/GdkuUdEkxNpudbjMUcRXOwp7MHJWl1rrjyLfccJ/l7duJ XHdLk9gzq58m/ORtUkaiwl1wbiljIHS7FNZ4LDcrVAyjksznk59Dta5NGiPjvtj8bkLP ciGAT4a993CmQ0JyJd5NFLHlqAfl/6/E1CaxvWV3eSFluCognc+6UxLkXyMkLtuM0rn2 a0fQ== X-Gm-Message-State: AIkVDXKQnsvSuvWqYhTBelWEUHFHUR/6VS3fqGJnfe9ZRkSLheVz3MxkNsKEnqs3WYuy5FR/v+uic2zrznu3PXJ6 X-Received: by 10.36.43.193 with SMTP id h184mr9076391ita.29.1482406059090; Thu, 22 Dec 2016 03:27:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.107.47.92 with HTTP; Thu, 22 Dec 2016 03:27:38 -0800 (PST) From: Prathamesh Kulkarni Date: Thu, 22 Dec 2016 16:57:38 +0530 Message-ID: Subject: [gimplefe] change dump format of realpart_expr and imagpart_expr with TDF_GIMPLE To: gcc Patches , Richard Biener X-IsSubscribed: yes Hi, For TDF_GIMPLE, the attached patch changes dump format of realpart_expr from REALPART_EXPR to __real var since the latter form is accepted by gimplefe. Similarly for imagpart_expr. Is this OK after bootstrap+test ? Thanks, Prathamesh diff --git a/gcc/testsuite/gcc.dg/gimplefe-20.c b/gcc/testsuite/gcc.dg/gimplefe-20.c new file mode 100644 index 0000000..99b3180 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gimplefe-20.c @@ -0,0 +1,20 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fgimple -fdump-tree-ssa-gimple" } */ + +_Complex a; + +double __GIMPLE() f() +{ + double t1; + double t2; + double _1; + +bb1: + t1_2 = __real a; + t2_3 = __imag a; + _1 = t1_2 + t2_3; + return _1; +} + +/* { dg-final { scan-tree-dump "__real a" "ssa" } } */ +/* { dg-final { scan-tree-dump "__imag a" "ssa" } } */ diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 5b3e23e..40c0bc6 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -2451,15 +2451,31 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, int flags, break; case REALPART_EXPR: - pp_string (pp, "REALPART_EXPR <"); - dump_generic_node (pp, TREE_OPERAND (node, 0), spc, flags, false); - pp_greater (pp); + if (flags & TDF_GIMPLE) + { + pp_string (pp, "__real "); + dump_generic_node (pp, TREE_OPERAND (node, 0), spc, flags, false); + } + else + { + pp_string (pp, "REALPART_EXPR <"); + dump_generic_node (pp, TREE_OPERAND (node, 0), spc, flags, false); + pp_greater (pp); + } break; case IMAGPART_EXPR: - pp_string (pp, "IMAGPART_EXPR <"); - dump_generic_node (pp, TREE_OPERAND (node, 0), spc, flags, false); - pp_greater (pp); + if (flags & TDF_GIMPLE) + { + pp_string (pp, "__imag "); + dump_generic_node (pp, TREE_OPERAND (node, 0), spc, flags, false); + } + else + { + pp_string (pp, "IMAGPART_EXPR <"); + dump_generic_node (pp, TREE_OPERAND (node, 0), spc, flags, false); + pp_greater (pp); + } break; case VA_ARG_EXPR: