Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/816178/?format=api
{ "id": 816178, "url": "http://patchwork.ozlabs.org/api/patches/816178/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/87bmm51s2o.fsf@linaro.org/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "name": "GNU Compiler Collection", "link_name": "gcc", "list_id": "gcc-patches.gcc.gnu.org", "list_email": "gcc-patches@gcc.gnu.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<87bmm51s2o.fsf@linaro.org>", "list_archive_url": null, "date": "2017-09-20T12:18:39", "name": "match.pd handling of three-constant bitops", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "918bfbefffb4ed6f651e3fa70e330c5acac91590", "submitter": { "id": 5450, "url": "http://patchwork.ozlabs.org/api/people/5450/?format=api", "name": "Richard Sandiford", "email": "richard.sandiford@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/87bmm51s2o.fsf@linaro.org/mbox/", "series": [ { "id": 4100, "url": "http://patchwork.ozlabs.org/api/series/4100/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=4100", "date": "2017-09-20T12:18:39", "name": "match.pd handling of three-constant bitops", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/4100/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/816178/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/816178/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-462580-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-462580-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=\"wqm0+9Qk\"; 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 3xxzLm0SqLz9t2Q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Sep 2017 22:19:10 +1000 (AEST)", "(qmail 24561 invoked by alias); 20 Sep 2017 12:18:47 -0000", "(qmail 24466 invoked by uid 89); 20 Sep 2017 12:18:46 -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\tWed, 20 Sep 2017 12:18:45 +0000", "by mail-wm0-f49.google.com with SMTP id i189so6657267wmf.1 for\n\t<gcc-patches@gcc.gnu.org>; Wed, 20 Sep 2017 05:18:44 -0700 (PDT)", "from localhost (92.40.248.127.threembb.co.uk. [92.40.248.127]) by\n\tsmtp.gmail.com with ESMTPSA id\n\tb89sm1806899wrd.42.2017.09.20.05.18.41 for\n\t<gcc-patches@gcc.gnu.org> (version=TLS1_2\n\tcipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tWed, 20 Sep 2017 05:18:41 -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:from\n\t:to:subject:date:message-id:mime-version:content-type; q=dns; s=\n\tdefault; b=lyJlQOius6Q6T0ZLIP0Uld/cP7L30AfJE5DgK3J7cFQGVvvwzhcWB\n\tXFBkoedwMfohnd0hVjUHqC5kbIvv0Hv1UHTXItnGbvGx34RUiHz0NjHasPsCHXlj\n\tmH3gMVc1anBIfxCsdzl4vQOZSZi22BZJQfmT3T3BQkaUJVGGqYeHW4=", "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:subject:date:message-id:mime-version:content-type; s=\n\tdefault; bh=VzrXX/ImowKLbiNZJA54yhrGygk=; b=wqm0+9Qk/8Cr/PSTFgPQ\n\t7ngrj1ei7dq01iE5ybeo1Kvj0ofI02vs8wed4Xr/Iw/+st6Q66Ab2OfKFXXGOH3q\n\tQMhgAg5bsiL7gjkj96sA/x/VKFQqzvBWwOJcIiw254EmqZVo1hlF6ApAXVFH5oKR\n\tHzKN4hQLywYYT6hk2tTOn2E=", "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=-11.3 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=stood", "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:from:to:mail-followup-to:subject:date:message-id\n\t:user-agent:mime-version;\n\tbh=naZ7LQpo6F3hK/oKJXkjUqrfbSpSNqHD9okjHOQv8eQ=;\n\tb=cfNvYTU4amEty1xbjfwsiNkg5Oicr2n32mIkYui6t24omTYsTZTZ/rDpwKKMQWal1j\n\ttp6+Xs8tEH3nD8V6crWI1EM4k1XFmqMuMtYmeNgpY+OpKbxL3RX4rGz9IqlRyURfOqfS\n\tgHNJNfawfYJxanMOsyXR2ZK5F/atb0NX6CsjYLUPt9GXd9MPSSNbugMRsGkkhjA+Mouj\n\tmvK/zr7Hy69WBY8GIEyVzm0uzH/LrXadImwyqldlIqXwM8xSqcOk+bi4OxCpnv+e7GNq\n\tB92wirsnqt7Fe6aOi5qG2Hj84eML26wwejZwetsvjqHB3GtFFvrPyd/H3OZIUxv4F7IQ\n\tLvSQ==", "X-Gm-Message-State": "AHPjjUiWb7Vp+HEPS3tXEPlxRYu3Lv8d/RJJhfkmaaY8R+Mi/LTK33ys\t1+du97iMbVokKKTci3NDOvxeRvdreF8=", "X-Google-Smtp-Source": "AOwi7QCXAmeMEDXs8QM0CAGJNAlvQlihBI6N0zWwLfz2u4mT9IcgD15NaPIUqcSo6rUzGYqGic386Q==", "X-Received": "by 10.28.105.12 with SMTP id e12mr3696981wmc.29.1505909922768;\n\tWed, 20 Sep 2017 05:18:42 -0700 (PDT)", "From": "Richard Sandiford <richard.sandiford@linaro.org>", "To": "gcc-patches@gcc.gnu.org", "Mail-Followup-To": "gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org", "Subject": "match.pd handling of three-constant bitops", "Date": "Wed, 20 Sep 2017 13:18:39 +0100", "Message-ID": "<87bmm51s2o.fsf@linaro.org>", "User-Agent": "Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)", "MIME-Version": "1.0", "Content-Type": "text/plain" }, "content": "natch.pd tries to reassociate two bit operations if both of them have\nconstant operands. However, with the polynomial integers added later,\nthere's no guarantee that a bit operation on two integers can be folded\nat compile time. This means that the pattern can trigger for operations\non three constants, and as things stood could endlessly oscillate\nbetween the two associations.\n\nThis patch keeps the existing pattern for the normal case of a\nnon-constant first operand. When all three operands are constant it\ntries to find a pair of constants that do fold. If none do, it keeps\nthe original expression as-was.\n\nTested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linus-gnu.\nOK to install?\n\nRichard\n\n\n2017-09-20 Richard Sandiford <richard.sandiford@linaro.org>\n\t Alan Hayward <alan.hayward@arm.com>\n\t David Sherwood <david.sherwood@arm.com>\n\ngcc/\n\t* match.pd: Handle bit operations involving three constants\n\tand try to fold one pair.", "diff": "Index: gcc/match.pd\n===================================================================\n--- gcc/match.pd\t2017-09-16 21:38:21.106513157 +0100\n+++ gcc/match.pd\t2017-09-20 13:17:10.552389270 +0100\n@@ -1017,7 +1017,14 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)\n (for bitop (bit_and bit_ior bit_xor)\n (simplify\n (bitop (bitop @0 CONSTANT_CLASS_P@1) CONSTANT_CLASS_P@2)\n- (bitop @0 (bitop @1 @2))))\n+ (if (!CONSTANT_CLASS_P (@0))\n+ (bitop @0 (bitop @1 @2))\n+ (with { tree cst1 = const_binop (bitop, type, @0, @2); }\n+ (if (cst1)\n+ (bitop @1 { cst1; })\n+ (with { tree cst2 = const_binop (bitop, type, @1, @2); }\n+ (if (cst2)\n+ (bitop @0 { cst2; }))))))))\n \n /* Try simple folding for X op !X, and X op X with the help\n of the truth_valued_p and logical_inverted_value predicates. */\n", "prefixes": [] }