Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/810459/?format=api
{ "id": 810459, "url": "http://patchwork.ozlabs.org/api/patches/810459/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170906091533.t6r3gatru4pn4vtc@virgil.suse.cz/", "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": "<20170906091533.t6r3gatru4pn4vtc@virgil.suse.cz>", "list_archive_url": null, "date": "2017-09-06T09:15:33", "name": "[PR,82078] Enqueue all SRA links for write flag propagation", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "49a9bc9eb358972830a4b07f3723315cdf97d1be", "submitter": { "id": 4351, "url": "http://patchwork.ozlabs.org/api/people/4351/?format=api", "name": "Martin Jambor", "email": "mjambor@suse.cz" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170906091533.t6r3gatru4pn4vtc@virgil.suse.cz/mbox/", "series": [ { "id": 1731, "url": "http://patchwork.ozlabs.org/api/series/1731/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1731", "date": "2017-09-06T09:15:33", "name": "[PR,82078] Enqueue all SRA links for write flag propagation", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1731/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810459/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810459/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461559-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-461559-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=\"M4ha1JhL\"; 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 3xnHxc1lNtz9sRV\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 6 Sep 2017 19:15:47 +1000 (AEST)", "(qmail 29079 invoked by alias); 6 Sep 2017 09:15:38 -0000", "(qmail 27571 invoked by uid 89); 6 Sep 2017 09:15:37 -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\tWed, 06 Sep 2017 09:15:36 +0000", "from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254])\tby\n\tmx1.suse.de (Postfix) with ESMTP id 45E41AE73\tfor\n\t<gcc-patches@gcc.gnu.org>; Wed, 6 Sep 2017 09:15:34 +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:cc:subject:message-id:mime-version:content-type; q=dns;\n\ts=default; b=l/1R1hVzcgD6GMJGGBiJs61+wKvlSH1pe/dOZlYbb/TSnkwozi\n\thapZXsW9/7V8PUh0C7Nf9pGSu1Bb0KjttGYtncGdFHDNkqzo6/jnxQ0c5iVrI4B1\n\t+EFScpoJ5pxweXiLQm6ekoTGa1nrg3h3eFYEUJJ3QEmB24h5TudA/DHzs=", "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:mime-version:content-type; s=\n\tdefault; bh=yZFlnVSkz0eC1kSAHoibhj1teuQ=; b=M4ha1JhLBLG7R1WdAgqm\n\tp6Hi5+ZT4qM+FP2dVKXK5/QmMrKHKQ/rKrcP2hgdgMcxDd8nbwwCcbAVETnPl41y\n\t+lGuNvkp+1IgCBqJpxwwZqqGVQWAAuWccKgfcMENpifYmD51SESPmaWyXwVuGLG0\n\tTHaGrRSZl44nEtbeVlbcIng=", "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,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=Let's,\n\trepresentative", "X-HELO": "mx1.suse.de", "Date": "Wed, 6 Sep 2017 11:15:33 +0200", "From": "Martin Jambor <mjambor@suse.cz>", "To": "GCC Patches <gcc-patches@gcc.gnu.org>", "Cc": "Richard Biener <rguenther@suse.de>", "Subject": "[PR 82078] Enqueue all SRA links for write flag propagation", "Message-ID": "<20170906091533.t6r3gatru4pn4vtc@virgil.suse.cz>", "Mail-Followup-To": "GCC Patches <gcc-patches@gcc.gnu.org>,\n\tRichard Biener <rguenther@suse.de>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=utf-8", "Content-Disposition": "inline", "User-Agent": "NeoMutt/20170609 (1.8.3)", "X-IsSubscribed": "yes" }, "content": "Hi,\n\nPR 82078 is another fallout from lazy setting of written flag in SRA.\nThe problem here is that we do not enqueue assignment links going out\nof accesses of candidates that were disqualified before we start the\nloop with sort_and_splice_var_accesses.\n\nGiven that the propagation is now a correctness necessity, we need to\nenqueue all links for processing, so this patch does it when they they\nare created. There should be very little extra work done because of\nthis because propagate_all_subaccesses starts with checking the\ncandidate-status of both sides of each link and acts accordingly.\n\nBootstrapped and tested on x86_64-linux without any issues. OK for\ntrunk?\n\nThanks,\n\nMartin\n\n\n\n2017-09-05 Martin Jambor <mjambor@suse.cz>\n\n\tPR tree-optimization/82078\ngcc/\n\t* tree-sra.c (sort_and_splice_var_accesses): Move call to\n\tadd_access_to_work_queue...\n\t(build_accesses_from_assign): ...here.\n\t(propagate_all_subaccesses): Make sure racc is the group\n\trepresentative, if there is one.\n\ngcc/testsuite/\n\t* gcc.dg/tree-ssa/pr82078.c: New test.\n---\n gcc/testsuite/gcc.dg/tree-ssa/pr82078.c | 27 +++++++++++++++++++++++++++\n gcc/tree-sra.c | 5 ++++-\n 2 files changed, 31 insertions(+), 1 deletion(-)\n create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr82078.c", "diff": "diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr82078.c b/gcc/testsuite/gcc.dg/tree-ssa/pr82078.c\nnew file mode 100644\nindex 00000000000..3774986324b\n--- /dev/null\n+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr82078.c\n@@ -0,0 +1,27 @@\n+/* { dg-do run } */\n+/* { dg-options \"-O\" } */\n+\n+struct S0 {\n+ signed f4;\n+ signed f9 : 5;\n+} a[6][5], b = {2}\n+\n+;\n+int c, d;\n+int fn1() {\n+ struct S0 e[5][6];\n+ struct S0 f;\n+ b = f = e[2][5] = a[5][0];\n+ if (d)\n+ ;\n+ else\n+ return f.f9;\n+ e[c][45] = a[4][4];\n+}\n+\n+int main() {\n+ fn1();\n+ if (b.f4 != 0)\n+ __builtin_abort ();\n+ return 0;\n+}\ndiff --git a/gcc/tree-sra.c b/gcc/tree-sra.c\nindex 68edbce21b3..163b7a2d03b 100644\n--- a/gcc/tree-sra.c\n+++ b/gcc/tree-sra.c\n@@ -1359,6 +1359,8 @@ build_accesses_from_assign (gimple *stmt)\n link->lacc = lacc;\n link->racc = racc;\n add_link_to_rhs (racc, link);\n+ add_access_to_work_queue (racc);\n+\n /* Let's delay marking the areas as written until propagation of accesses\n \t across link, unless the nature of rhs tells us that its data comes\n \t from elsewhere. */\n@@ -2118,7 +2120,6 @@ sort_and_splice_var_accesses (tree var)\n access->grp_total_scalarization = total_scalarization;\n access->grp_partial_lhs = grp_partial_lhs;\n access->grp_unscalarizable_region = unscalarizable_region;\n- add_access_to_work_queue (access);\n \n *prev_acc_ptr = access;\n prev_acc_ptr = &access->next_grp;\n@@ -2712,6 +2713,8 @@ propagate_all_subaccesses (void)\n struct access *racc = pop_access_from_work_queue ();\n struct assign_link *link;\n \n+ if (racc->group_representative)\n+\tracc= racc->group_representative;\n gcc_assert (racc->first_link);\n \n for (link = racc->first_link; link; link = link->next)\n", "prefixes": [ "PR", "82078" ] }