Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/810914/?format=api
{ "id": 810914, "url": "http://patchwork.ozlabs.org/api/1.2/patches/810914/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/alpine.LSU.2.20.1709071041050.14191@zhemvz.fhfr.qr/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<alpine.LSU.2.20.1709071041050.14191@zhemvz.fhfr.qr>", "list_archive_url": null, "date": "2017-09-07T08:46:24", "name": "Enhance PHI processing in VN", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e1abb656cd756d00909e7d60d0d95aa09d7b0c58", "submitter": { "id": 4338, "url": "http://patchwork.ozlabs.org/api/1.2/people/4338/?format=api", "name": "Richard Biener", "email": "rguenther@suse.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/alpine.LSU.2.20.1709071041050.14191@zhemvz.fhfr.qr/mbox/", "series": [ { "id": 1948, "url": "http://patchwork.ozlabs.org/api/1.2/series/1948/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1948", "date": "2017-09-07T08:46:24", "name": "Enhance PHI processing in VN", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1948/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810914/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810914/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461664-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-461664-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=\"T6vSgzzB\"; 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 3xnvFY0Thjz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 7 Sep 2017 18:46:40 +1000 (AEST)", "(qmail 49463 invoked by alias); 7 Sep 2017 08:46:30 -0000", "(qmail 48918 invoked by uid 89); 7 Sep 2017 08:46:29 -0000", "from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 07 Sep 2017 08:46:27 +0000", "from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\tby\n\tmx1.suse.de (Postfix) with ESMTP id 10979AD57\tfor\n\t<gcc-patches@gcc.gnu.org>; Thu, 7 Sep 2017 08:46:25 +0000 (UTC)" ], "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:subject:message-id:mime-version:content-type; q=dns; s=\n\tdefault; b=lzKFyAZ+GsyQXwxiPyBzVCcJhidnQ+6USBuJCtfp7YiG3EJZOhogf\n\tfy7zNiXQ6dWqI93Wafq9rZ1ePGpJjRQorUxvV8rMT9uR6HmcI13JFYyHijIM7ebN\n\tmezgTZANDx4IC+ZlTE/xbMiRucsETZaftTUuU/28HLRtkoUWWmJJK8=", "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:subject:message-id:mime-version:content-type; s=\n\tdefault; bh=3q/TUfUT2inR23grTNL/HXmOSD4=; b=T6vSgzzBDfHeDSrz6g+V\n\tnpqrEKSf1tHknNse5t9Uo2ZPgMJuNP1Qy/XCzQoMR/xmp2yW1BHlXASuaF03oBWK\n\tgFykXH7NJgR0DUiWiVkaIDT31FP+qoQ5MyiIOlCCKSozTgjYIjoZMCMeNM6VKxdr\n\t4Y3I2y7tQVCv4sjlf6eIK/k=", "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.1 required=5.0 tests=BAYES_00, GIT_PATCH_2,\n\tGIT_PATCH_3, KAM_ASCII_DIVIDERS, RP_MATCHES_RCVD,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=equation,\n\tforwarders", "X-HELO": "mx1.suse.de", "Date": "Thu, 7 Sep 2017 10:46:24 +0200 (CEST)", "From": "Richard Biener <rguenther@suse.de>", "To": "gcc-patches@gcc.gnu.org", "Subject": "[PATCH] Enhance PHI processing in VN", "Message-ID": "<alpine.LSU.2.20.1709071041050.14191@zhemvz.fhfr.qr>", "User-Agent": "Alpine 2.20 (LSU 67 2015-01-07)", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=US-ASCII" }, "content": "This enhances VN to do the same PHI handling as CCP, meeting\nundefined and constant to constant. I've gone a little bit\nfurther (and maybe will revisit this again) in also meeting\nall-undefined to undefined taking one of the undefined args\nas the value number. I feel like this might run into\nthe equation issues I mentioned in the other mail so it\nwould be cleaner to invent a \"new\" undefined value number\nhere -- but I have to make sure to not create too many\ndefault-defs or break iteration convergence (default defs are also\nexpensive given they require a decl - sth I want to change as well).\n\nSo for now I guess I'll stick with the slightly bogus(?) way also\nhoping for a testcase that shows the issue this uncovers.\n\nNote it's required to handle\n\n_3 = PHI <_1(D), _2(D)>\n..\n\n_4 = PHI <_3, 1>\n\nconsistently with\n\n_4 = PHI <_1(D), _2(D), 1>\n\naka with/without extra forwarders.\n\nSimilar to CCP/copyprop this doesn't allow copies to be propagated\nthis way as this removes most gcc.dg/Wuninitialized* warnings\nwe test for...\n\nBootstrapped on x86_64-unknown-linux-gnu, testing in progress.\n\nRichard.\n\n2017-09-07 Richard Biener <rguenther@suse.de>\n\n\t* tree-ssa-sccnv.c (visit_phi): Handle meeting undefined\n\tvalues.\n\n\t* gcc.dg/tree-ssa/ssa-fre-59.c: New testcase.", "diff": "Index: gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-59.c\n===================================================================\n--- gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-59.c\t(nonexistent)\n+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-59.c\t(working copy)\n@@ -0,0 +1,14 @@\n+/* { dg-do compile } */\n+/* { dg-options \"-O -fdump-tree-fre1\" } */\n+\n+int i;\n+int foo (int b)\n+{\n+ int j;\n+ i = 1;\n+ if (b)\n+ j = i;\n+ return i - j;\n+}\n+\n+/* { dg-final { scan-tree-dump \"return 0;\" \"fre1\" } } */\nIndex: gcc/tree-ssa-sccvn.c\n===================================================================\n--- gcc/tree-ssa-sccvn.c\t(revision 251833)\n+++ gcc/tree-ssa-sccvn.c\t(working copy)\n@@ -3864,6 +3864,7 @@ visit_phi (gimple *phi)\n tree result;\n tree sameval = VN_TOP;\n bool allsame = true;\n+ tree seen_undef = NULL_TREE;\n unsigned n_executable = 0;\n \n /* TODO: We could check for this in init_sccvn, and replace this\n@@ -3884,8 +3885,12 @@ visit_phi (gimple *phi)\n \tif (TREE_CODE (def) == SSA_NAME)\n \t def = SSA_VAL (def);\n \tif (def == VN_TOP)\n-\t continue;\n-\tif (sameval == VN_TOP)\n+\t ;\n+\t/* Ignore undefined defs here. */\n+\telse if (TREE_CODE (def) == SSA_NAME\n+\t\t && ssa_undefined_value_p (def, false))\n+\t seen_undef = def;\n+\telse if (sameval == VN_TOP)\n \t sameval = def;\n \telse if (!expressions_equal_p (def, sameval))\n \t {\n@@ -3893,7 +3898,18 @@ visit_phi (gimple *phi)\n \t break;\n \t }\n }\n- \n+ /* If we found undefined values and didn't end up with a constant\n+ drop back to varying as otherwise we end up removing most late\n+ uninitialized use warnings. CCP/copyprop have the same restriction. */\n+ if (allsame && seen_undef)\n+ {\n+ /* Unless this was the only value we've seen. */\n+ if (sameval == VN_TOP)\n+\tsameval = seen_undef;\n+ else if (! is_gimple_min_invariant (sameval))\n+\tallsame = false;\n+ }\n+\n /* If none of the edges was executable or all incoming values are\n undefined keep the value-number at VN_TOP. If only a single edge\n is exectuable use its value. */\n", "prefixes": [] }