[{"id":1775783,"web_url":"http://patchwork.ozlabs.org/comment/1775783/","msgid":"<20170926185602.GQ22260@embecosm.com>","list_archive_url":null,"date":"2017-09-26T18:56:02","subject":"Re: [PATCH] [ARC][ZOL] Account for empty body loops","submitter":{"id":65155,"url":"http://patchwork.ozlabs.org/api/people/65155/","name":"Andrew Burgess","email":"andrew.burgess@embecosm.com"},"content":"* Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com> [2017-09-01 14:32:10 +0200]:\n\n> From: claziss <claziss@synopsys.com>\n> \n> Hi Andrew,\n> \n> By mistake I've pushed an incoplete ZOL-rework patch, and it missing the attached parts. Please can you check if it is ok?\n> \n> Thank you,\n> Claudiu\n> \n> gcc/\n> 2017-09-01  Claudiu Zissulescu <claziss@synopsys.com>\n> \n> \t    * config/arc/arc.c (hwloop_optimize): Account for empty\n> \t    body loops.\n\nLooks good to me.\n\nThanks,\nAndrew\n\n\n> \n> testsuite/\n> 2017-09-01  Claudiu Zissulescu <claziss@synopsys.com>\n> \n>  \t        * gcc.target/arc/loop-1.c: Add test.\n> ---\n>  gcc/config/arc/arc.c                  | 13 +++++++++++--\n>  gcc/testsuite/gcc.target/arc/loop-1.c | 12 ++++++++++++\n>  2 files changed, 23 insertions(+), 2 deletions(-)\n>  create mode 100755 gcc/testsuite/gcc.target/arc/loop-1.c\n> \n> diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c\n> index 52a9b24..d519063 100644\n> --- a/gcc/config/arc/arc.c\n> +++ b/gcc/config/arc/arc.c\n> @@ -7240,6 +7240,12 @@ hwloop_optimize (hwloop_info loop)\n>  \tfprintf (dump_file, \";; loop %d too long\\n\", loop->loop_no);\n>        return false;\n>      }\n> +  else if (!loop->length)\n> +    {\n> +      if (dump_file)\n> +\tfprintf (dump_file, \";; loop %d is empty\\n\", loop->loop_no);\n> +      return false;\n> +    }\n>  \n>    /* Check if we use a register or not.  */\n>    if (!REG_P (loop->iter_reg))\n> @@ -7311,8 +7317,11 @@ hwloop_optimize (hwloop_info loop)\n>        && INSN_P (last_insn)\n>        && (JUMP_P (last_insn) || CALL_P (last_insn)\n>  \t  || GET_CODE (PATTERN (last_insn)) == SEQUENCE\n> -\t  || get_attr_type (last_insn) == TYPE_BRCC\n> -\t  || get_attr_type (last_insn) == TYPE_BRCC_NO_DELAY_SLOT))\n> +\t  /* At this stage we can have (insn (clobber (mem:BLK\n> +\t     (reg)))) instructions, ignore them.  */\n> +\t  || (GET_CODE (PATTERN (last_insn)) != CLOBBER\n> +\t      && (get_attr_type (last_insn) == TYPE_BRCC\n> +\t\t  || get_attr_type (last_insn) == TYPE_BRCC_NO_DELAY_SLOT))))\n>      {\n>        if (loop->length + 2 > ARC_MAX_LOOP_LENGTH)\n>  \t{\n> diff --git a/gcc/testsuite/gcc.target/arc/loop-1.c b/gcc/testsuite/gcc.target/arc/loop-1.c\n> new file mode 100755\n> index 0000000..274bb46\n> --- /dev/null\n> +++ b/gcc/testsuite/gcc.target/arc/loop-1.c\n> @@ -0,0 +1,12 @@\n> +/* { dg-do compile } */\n> +/* { dg-options \"-O2\" } */\n> +\n> +/* Check how we handle empty body loops.  */\n> +\n> +int a;\n> +void fn1(void) {\n> +  int i;\n> +  for (; i < 8; i++) {\n> +    double A[a];\n> +  }\n> +}\n> -- \n> 1.9.1\n>","headers":{"Return-Path":"<gcc-patches-return-463021-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-463021-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"r6ADmcNN\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y1qtG0PBJz9s7F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 27 Sep 2017 04:56:20 +1000 (AEST)","(qmail 73606 invoked by alias); 26 Sep 2017 18:56:09 -0000","(qmail 72548 invoked by uid 89); 26 Sep 2017 18:56:08 -0000","from mail-wm0-f49.google.com (HELO mail-wm0-f49.google.com)\n\t(74.125.82.49) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 26 Sep 2017 18:56:06 +0000","by mail-wm0-f49.google.com with SMTP id m127so10944659wmm.3 for\n\t<gcc-patches@gcc.gnu.org>; Tue, 26 Sep 2017 11:56:06 -0700 (PDT)","from localhost (host86-152-213-31.range86-152.btcentralplus.com.\n\t[86.152.213.31]) by smtp.gmail.com with ESMTPSA id\n\tq4sm2449423wmd.19.2017.09.26.11.56.03 (version=TLS1_2\n\tcipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 26 Sep 2017 11:56:03 -0700 (PDT)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:references:mime-version\n\t:content-type:in-reply-to; q=dns; s=default; b=LSzQkJ37RaX6uHYWq\n\tjFFRMnwrwXWgRI9HUwQziqe9f3pXsYEvjAY0VFi8lxeiPYRvtxP9YUNIvvgzL20h\n\tBpPDgRGPon+0z3DIXJS7lh6HRwZg3uh/ARVH/MWlS924atk8cIwGEOZs2fdjPLOY\n\tUUcDaTJgpjKAFAquDQyrie3sZg=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:references:mime-version\n\t:content-type:in-reply-to; s=default; bh=LjmvBSkxPwY97mw5N5wH6UK\n\tNoG0=; b=r6ADmcNNuoTf8o58Q3/0BZjLf3Snp2RJQYcwz0u0gTD3MNbXnpUsQEj\n\tSahxW3sMw+09VKTIbTpE4gJUktqFsMlzpke7e9VyBWQO6kObkY3o9b3oK08La+33\n\tknESsAStV1IqNb03Y1Il+Qth/vKDQ7M21jGrCQUFRG7vk07xdXI8=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2403,\n\tH*Ad:D*synopsys.com, HTo:D*synopsys.com","X-HELO":"mail-wm0-f49.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=8qgH9ww4FyaqcwyO/F7DjVBDhfhZdmzexZrdjIcSdXM=;\n\tb=Pb6Z5hjuWsbOv5ELeAfRhrHxHUl9DJS7YNNKOZN8PfAoyGdXyiZH4q4vmspOouXduL\n\th8FFxKLiJQdJXstpe628cQWgjdKpqfUKAuh5yQYBOW8vqV8iJIOMrWxY80J8QUvr1h+B\n\tSo0X759VEh6cxLHhqGUAoFwtLbs0aOxCtHtbr0aloD63lw5d4w+8VZDAB0aJZt+BxxGt\n\tVASTigSzdU7Tw0A7PoYA7ZZkuMF1VWPQXrNKNJ/u5hpJhdhM0zYcaIQoxwQgP9dH3u40\n\tr2mR5LQyCl4/csfrMtI4Mm8Cjq0oEIVorYhP91S6L0rsibJ9Z1YPen8MY/kjzNbl6dcE\n\tsHlQ==","X-Gm-Message-State":"AHPjjUgdO9kah64MZrf8Eu5e5Av/bor/Bx85viJJwqsGZcm3/zlvEAls\t0rUxuDUOHwzC4v9cTQozX/zqGQ==","X-Google-Smtp-Source":"AOwi7QDe0RrTAgQLhntI1WDIZ8rrmpf2snpp4Hbw4xkOTcJizeN29EVsR7hWkKoEO8eAeiUJ2tpoLQ==","X-Received":"by 10.28.238.218 with SMTP id j87mr4199897wmi.44.1506452164344;\n\tTue, 26 Sep 2017 11:56:04 -0700 (PDT)","Date":"Tue, 26 Sep 2017 19:56:02 +0100","From":"Andrew Burgess <andrew.burgess@embecosm.com>","To":"Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>","Cc":"gcc-patches@gcc.gnu.org, Francois.Bedard@synopsys.com","Subject":"Re: [PATCH] [ARC][ZOL] Account for empty body loops","Message-ID":"<20170926185602.GQ22260@embecosm.com>","References":"<20170831190757.GO22260@embecosm.com>\n\t<1504269130-29760-1-git-send-email-claziss@synopsys.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<1504269130-29760-1-git-send-email-claziss@synopsys.com>","X-Editor":"GNU Emacs [ http://www.gnu.org/software/emacs ]","User-Agent":"Mutt/1.6.1 (2016-04-27)","X-IsSubscribed":"yes"}},{"id":1797785,"web_url":"http://patchwork.ozlabs.org/comment/1797785/","msgid":"<098ECE41A0A6114BB2A07F1EC238DE89667B65F7@de02wembxa.internal.synopsys.com>","list_archive_url":null,"date":"2017-11-02T10:20:54","subject":"RE: [PATCH] [ARC][ZOL] Account for empty body loops","submitter":{"id":67086,"url":"http://patchwork.ozlabs.org/api/people/67086/","name":"Claudiu Zissulescu","email":"Claudiu.Zissulescu@synopsys.com"},"content":"> > gcc/\n> > 2017-09-01  Claudiu Zissulescu <claziss@synopsys.com>\n> >\n> > \t    * config/arc/arc.c (hwloop_optimize): Account for empty\n> > \t    body loops.\n> \n> Looks good to me.\n> \n> Thanks,\n> Andrew\n> \n> \n\nPushed. Thank you for your review,\nClaudiu","headers":{"Return-Path":"<gcc-patches-return-465721-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-465721-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"aDXVFsC+\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3ySLlG0Lk7z9sNc\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  2 Nov 2017 21:23:17 +1100 (AEDT)","(qmail 13190 invoked by alias); 2 Nov 2017 10:22:52 -0000","(qmail 12832 invoked by uid 89); 2 Nov 2017 10:22:52 -0000","from smtprelay.synopsys.com (HELO smtprelay.synopsys.com)\n\t(198.182.60.111) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 02 Nov 2017 10:22:51 +0000","from mailhost.synopsys.com (mailhost3.synopsys.com\n\t[10.12.238.238])\tby smtprelay.synopsys.com (Postfix) with\n\tESMTP id CFF5B10C1661; Thu,  2 Nov 2017 03:22:49 -0700 (PDT)","from mailhost.synopsys.com (localhost [127.0.0.1])\tby\n\tmailhost.synopsys.com (Postfix) with ESMTP id 6CA35300;\n\tThu,  2 Nov 2017 03:22:49 -0700 (PDT)","from US01WEHTC3.internal.synopsys.com\n\t(us01wehtc3.internal.synopsys.com [10.15.84.232])\tby\n\tmailhost.synopsys.com (Postfix) with ESMTP id 366992FE;\n\tThu,  2 Nov 2017 03:22:49 -0700 (PDT)","from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by\n\tUS01WEHTC3.internal.synopsys.com (10.15.84.232) with\n\tMicrosoft SMTP Server (TLS) id 14.3.266.1;\n\tThu, 2 Nov 2017 03:20:58 -0700","from DE02WEMBXA.internal.synopsys.com ([fe80::a014:7216:77d:d55c])\n\tby DE02WEHTCA.internal.synopsys.com ([::1]) with mapi id\n\t14.03.0266.001; Thu, 2 Nov 2017 11:20:56 +0100"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:date:message-id:references:in-reply-to\n\t:content-type:content-transfer-encoding:mime-version; q=dns; s=\n\tdefault; b=rBuHGP0RlH/wDB+dQZuPUbcjYD0P/2HjSFoIhvijoto0ijIXH4oan\n\tByaj0XwRej8GRCLAdn6M3zgunI86KV6iNmuxXzMwXsq5y7u2eoLHocisp+aserUG\n\tnT0KMUmGuFvV5qHBnwGU4UZ5t4bbPhm0RDIKnz/C8zs/qr2Eq8nPaw=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:from\n\t:to:cc:subject:date:message-id:references:in-reply-to\n\t:content-type:content-transfer-encoding:mime-version; s=default;\n\tbh=jdPi2u5sjgLry2e+rK5rAp6Yi5w=; b=aDXVFsC+UtkBpOaellMVownu1FNx\n\tlpfyPbHM8/mp+QMuwi3kH27vthnOHHQBDrryo8T3499O0E9CYL9Wdd5D2vNVdsBL\n\t1eevHq5K9SMuhjacYMJ/u1rBVaMvnLfutXuoqkGLz76pAv2sHeGvAtg3k9EniV91\n\t4aCcIgXu8IVwqkQ=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=1.1 required=5.0 tests=AWL, BAYES_50,\n\tKAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE,\n\tRP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=H*M:internal,\n\tH*RU:sk:smtprel, Hx-spam-relays-external:sk:smtprel,\n\tHX-HELO:sk:smtprel","X-HELO":"smtprelay.synopsys.com","From":"Claudiu Zissulescu <Claudiu.Zissulescu@synopsys.com>","To":"Andrew Burgess <andrew.burgess@embecosm.com>","CC":"\"gcc-patches@gcc.gnu.org\" <gcc-patches@gcc.gnu.org>,\n\t\"Francois.Bedard@synopsys.com\" <Francois.Bedard@synopsys.com>","Subject":"RE: [PATCH] [ARC][ZOL] Account for empty body loops","Date":"Thu, 2 Nov 2017 10:20:54 +0000","Message-ID":"<098ECE41A0A6114BB2A07F1EC238DE89667B65F7@de02wembxa.internal.synopsys.com>","References":"<20170831190757.GO22260@embecosm.com>\n\t<1504269130-29760-1-git-send-email-claziss@synopsys.com>\n\t<20170926185602.GQ22260@embecosm.com>","In-Reply-To":"<20170926185602.GQ22260@embecosm.com>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"quoted-printable","MIME-Version":"1.0"}}]