Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808495/?format=api
{ "id": 808495, "url": "http://patchwork.ozlabs.org/api/patches/808495/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170901011500.15345-1-aoliva@redhat.com/", "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": "<20170901011500.15345-1-aoliva@redhat.com>", "list_archive_url": null, "date": "2017-09-01T01:14:52", "name": "[1/9,SFN] adjust RTL insn-walking API", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "f561b1a589526b1a69f5956fcccc8a64806cb015", "submitter": { "id": 2058, "url": "http://patchwork.ozlabs.org/api/people/2058/?format=api", "name": "Alexandre Oliva", "email": "aoliva@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170901011500.15345-1-aoliva@redhat.com/mbox/", "series": [ { "id": 934, "url": "http://patchwork.ozlabs.org/api/series/934/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=934", "date": "2017-09-01T01:14:52", "name": "[1/9,SFN] adjust RTL insn-walking API", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/934/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808495/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808495/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461239-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-461239-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=\"rZtf79Jv\"; dkim-atps=neutral", "sourceware.org; auth=none", "ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=aoliva@redhat.com" ], "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 3xk1XM6xZ1z9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 1 Sep 2017 11:16:02 +1000 (AEST)", "(qmail 93681 invoked by alias); 1 Sep 2017 01:15:52 -0000", "(qmail 93671 invoked by uid 89); 1 Sep 2017 01:15:52 -0000", "from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tFri, 01 Sep 2017 01:15:50 +0000", "from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.11])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id 9565EC047B74;\n\tFri, 1 Sep 2017 01:15:49 +0000 (UTC)", "from freie.home (ovpn04.gateway.prod.ext.phx2.redhat.com\n\t[10.5.9.4])\tby smtp.corp.redhat.com (Postfix) with ESMTPS id\n\t5463E600C4; Fri, 1 Sep 2017 01:15:49 +0000 (UTC)", "from frit.home (frit.home [172.31.160.7])\tby freie.home\n\t(8.15.2/8.15.2) with ESMTP id v811FZOe009211;\n\tThu, 31 Aug 2017 22:15:35 -0300" ], "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:in-reply-to:references; q=dns; s=\n\tdefault; b=oE+l43WB+smJppIHq9TSWb0c0vZBF9g2PZDDH1Qd5PNXVmCp2dPBz\n\tmX4DjV6tSn2vVvAFDna54T4WJmdik18xvEEIWqVfuyYisR9HuPnNzsu1KKv0dC33\n\tP1ZK2wmdIXVWcWLKC5ipEF3YOUj+XokZSurT7HYP4JS+aZ6QHK+g6Q=", "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:in-reply-to:references; s=\n\tdefault; bh=lNlxvPcAnbFSxKco7z4I5KQ3cec=; b=rZtf79Jv0NSYPFYoNQj2\n\tSOAwKaPeLwOa6auUSlMJFu0uBXHoLSzK9Y8OYGF88NReAoYD/J8Mws4Ze/FFXPZ7\n\tmdniDgQtQSW1G4FxLyJAUplTwakpnlZTfSTDMCX+z+QybC0iw/MCjcPH6CeGi93i\n\tIx1xUz/FMeglWyav8LjSA0w=", "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=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*aoliva,\n\t334620", "X-HELO": "mx1.redhat.com", "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 9565EC047B74", "From": "Alexandre Oliva <aoliva@redhat.com>", "To": "Richard Biener <richard.guenther@gmail.com>", "Cc": "GCC Patches <gcc-patches@gcc.gnu.org>,\n\tAlexandre Oliva <aoliva@redhat.com>", "Subject": "[PATCH 1/9] [SFN] adjust RTL insn-walking API", "Date": "Thu, 31 Aug 2017 22:14:52 -0300", "Message-Id": "<20170901011500.15345-1-aoliva@redhat.com>", "In-Reply-To": "<orr2vrns5k.fsf@lxoliva.fsfla.org>", "References": "<orr2vrns5k.fsf@lxoliva.fsfla.org>" }, "content": "This patch removes unused RTL functions, introduces alternate ones for\nuse in a later SFN patch, and regroups other related functions so that\nthey appear in a more consistent order.\n\nfor gcc/ChangeLog\n\n\t* emit-rtl.c (next_nondebug_insn, prev_nondebug_insn): Reorder.\n\t(next_nonnote_nondebug_insn, prev_nonnote_nondebug_insn): Reorder.\n\t(next_nonnote_nondebug_insn_bb): New.\n\t(prev_nonnote_nondebug_insn_bb): New.\n\t(prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove.\n\t* rtl.h\t(prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove decls.\n\t(prev_nonnote_nondebug_insn_bb): Declare.\n\t(next_nonnote_nondebug_insn_bb): Declare.\n\t* cfgbuild.c (find_bb_boundaries): Adjust to skip debug insns.\n\t* cfgrtl.c (get_last_bb_insn): Likewise.\n\t* lra.c (push_insns): Likewise.\n---\n gcc/cfgbuild.c | 2 +-\n gcc/cfgrtl.c | 4 ++--\n gcc/emit-rtl.c | 69 ++++++++++++++++++++++++++++++++--------------------------\n gcc/lra.c | 2 +-\n gcc/rtl.h | 4 ++--\n 5 files changed, 44 insertions(+), 37 deletions(-)", "diff": "diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c\nindex 2fe74c4..4a3d903 100644\n--- a/gcc/cfgbuild.c\n+++ b/gcc/cfgbuild.c\n@@ -489,7 +489,7 @@ find_bb_boundaries (basic_block bb)\n \t the middle of a BB. We need to split it in the same manner as\n \t if the barrier were preceded by a control_flow_insn_p insn. */\n \t if (!flow_transfer_insn)\n-\t flow_transfer_insn = prev_nonnote_insn_bb (insn);\n+\t flow_transfer_insn = prev_nonnote_nondebug_insn_bb (insn);\n \t}\n \n if (control_flow_insn_p (insn))\ndiff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c\nindex 6ef47b7..bce56b4 100644\n--- a/gcc/cfgrtl.c\n+++ b/gcc/cfgrtl.c\n@@ -2274,11 +2274,11 @@ get_last_bb_insn (basic_block bb)\n end = table;\n \n /* Include any barriers that may follow the basic block. */\n- tmp = next_nonnote_insn_bb (end);\n+ tmp = next_nonnote_nondebug_insn_bb (end);\n while (tmp && BARRIER_P (tmp))\n {\n end = tmp;\n- tmp = next_nonnote_insn_bb (end);\n+ tmp = next_nonnote_nondebug_insn_bb (end);\n }\n \n return end;\ndiff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c\nindex 6951f61..a6efdd8 100644\n--- a/gcc/emit-rtl.c\n+++ b/gcc/emit-rtl.c\n@@ -3346,20 +3346,17 @@ next_nonnote_insn (rtx_insn *insn)\n return insn;\n }\n \n-/* Return the next insn after INSN that is not a NOTE, but stop the\n- search before we enter another basic block. This routine does not\n- look inside SEQUENCEs. */\n+/* Return the next insn after INSN that is not a DEBUG_INSN. This\n+ routine does not look inside SEQUENCEs. */\n \n rtx_insn *\n-next_nonnote_insn_bb (rtx_insn *insn)\n+next_nondebug_insn (rtx_insn *insn)\n {\n while (insn)\n {\n insn = NEXT_INSN (insn);\n- if (insn == 0 || !NOTE_P (insn))\n+ if (insn == 0 || !DEBUG_INSN_P (insn))\n \tbreak;\n- if (NOTE_INSN_BASIC_BLOCK_P (insn))\n-\treturn NULL;\n }\n \n return insn;\n@@ -3381,67 +3378,70 @@ prev_nonnote_insn (rtx_insn *insn)\n return insn;\n }\n \n-/* Return the previous insn before INSN that is not a NOTE, but stop\n- the search before we enter another basic block. This routine does\n- not look inside SEQUENCEs. */\n+/* Return the previous insn before INSN that is not a DEBUG_INSN.\n+ This routine does not look inside SEQUENCEs. */\n \n rtx_insn *\n-prev_nonnote_insn_bb (rtx_insn *insn)\n+prev_nondebug_insn (rtx_insn *insn)\n {\n-\n while (insn)\n {\n insn = PREV_INSN (insn);\n- if (insn == 0 || !NOTE_P (insn))\n+ if (insn == 0 || !DEBUG_INSN_P (insn))\n \tbreak;\n- if (NOTE_INSN_BASIC_BLOCK_P (insn))\n-\treturn NULL;\n }\n \n return insn;\n }\n \n-/* Return the next insn after INSN that is not a DEBUG_INSN. This\n- routine does not look inside SEQUENCEs. */\n+/* Return the next insn after INSN that is not a NOTE nor DEBUG_INSN.\n+ This routine does not look inside SEQUENCEs. */\n \n rtx_insn *\n-next_nondebug_insn (rtx_insn *insn)\n+next_nonnote_nondebug_insn (rtx_insn *insn)\n {\n while (insn)\n {\n insn = NEXT_INSN (insn);\n- if (insn == 0 || !DEBUG_INSN_P (insn))\n+ if (insn == 0 || (!NOTE_P (insn) && !DEBUG_INSN_P (insn)))\n \tbreak;\n }\n \n return insn;\n }\n \n-/* Return the previous insn before INSN that is not a DEBUG_INSN.\n- This routine does not look inside SEQUENCEs. */\n+/* Return the next insn after INSN that is not a NOTE nor DEBUG_INSN,\n+ but stop the search before we enter another basic block. This\n+ routine does not look inside SEQUENCEs. */\n \n rtx_insn *\n-prev_nondebug_insn (rtx_insn *insn)\n+next_nonnote_nondebug_insn_bb (rtx_insn *insn)\n {\n while (insn)\n {\n- insn = PREV_INSN (insn);\n- if (insn == 0 || !DEBUG_INSN_P (insn))\n+ insn = NEXT_INSN (insn);\n+ if (insn == 0)\n+\tbreak;\n+ if (DEBUG_INSN_P (insn))\n+\tcontinue;\n+ if (!NOTE_P (insn))\n \tbreak;\n+ if (NOTE_INSN_BASIC_BLOCK_P (insn))\n+\treturn NULL;\n }\n \n return insn;\n }\n \n-/* Return the next insn after INSN that is not a NOTE nor DEBUG_INSN.\n+/* Return the previous insn before INSN that is not a NOTE nor DEBUG_INSN.\n This routine does not look inside SEQUENCEs. */\n \n rtx_insn *\n-next_nonnote_nondebug_insn (rtx_insn *insn)\n+prev_nonnote_nondebug_insn (rtx_insn *insn)\n {\n while (insn)\n {\n- insn = NEXT_INSN (insn);\n+ insn = PREV_INSN (insn);\n if (insn == 0 || (!NOTE_P (insn) && !DEBUG_INSN_P (insn)))\n \tbreak;\n }\n@@ -3449,17 +3449,24 @@ next_nonnote_nondebug_insn (rtx_insn *insn)\n return insn;\n }\n \n-/* Return the previous insn before INSN that is not a NOTE nor DEBUG_INSN.\n- This routine does not look inside SEQUENCEs. */\n+/* Return the previous insn before INSN that is not a NOTE nor\n+ DEBUG_INSN, but stop the search before we enter another basic\n+ block. This routine does not look inside SEQUENCEs. */\n \n rtx_insn *\n-prev_nonnote_nondebug_insn (rtx_insn *insn)\n+prev_nonnote_nondebug_insn_bb (rtx_insn *insn)\n {\n while (insn)\n {\n insn = PREV_INSN (insn);\n- if (insn == 0 || (!NOTE_P (insn) && !DEBUG_INSN_P (insn)))\n+ if (insn == 0)\n \tbreak;\n+ if (DEBUG_INSN_P (insn))\n+\tcontinue;\n+ if (!NOTE_P (insn))\n+\tbreak;\n+ if (NOTE_INSN_BASIC_BLOCK_P (insn))\n+\treturn NULL;\n }\n \n return insn;\ndiff --git a/gcc/lra.c b/gcc/lra.c\nindex 1230b25..236cef7 100644\n--- a/gcc/lra.c\n+++ b/gcc/lra.c\n@@ -1812,7 +1812,7 @@ push_insns (rtx_insn *from, rtx_insn *to)\n static void\n setup_sp_offset (rtx_insn *from, rtx_insn *last)\n {\n- rtx_insn *before = next_nonnote_insn_bb (last);\n+ rtx_insn *before = next_nonnote_nondebug_insn_bb (last);\n HOST_WIDE_INT offset = (before == NULL_RTX || ! INSN_P (before)\n \t\t\t ? 0 : lra_get_insn_recog_data (before)->sp_offset);\n \ndiff --git a/gcc/rtl.h b/gcc/rtl.h\nindex 8a68bb1..9884b17 100644\n--- a/gcc/rtl.h\n+++ b/gcc/rtl.h\n@@ -2898,13 +2898,13 @@ extern rtx_call_insn *last_call_insn (void);\n extern rtx_insn *previous_insn (rtx_insn *);\n extern rtx_insn *next_insn (rtx_insn *);\n extern rtx_insn *prev_nonnote_insn (rtx_insn *);\n-extern rtx_insn *prev_nonnote_insn_bb (rtx_insn *);\n extern rtx_insn *next_nonnote_insn (rtx_insn *);\n-extern rtx_insn *next_nonnote_insn_bb (rtx_insn *);\n extern rtx_insn *prev_nondebug_insn (rtx_insn *);\n extern rtx_insn *next_nondebug_insn (rtx_insn *);\n extern rtx_insn *prev_nonnote_nondebug_insn (rtx_insn *);\n+extern rtx_insn *prev_nonnote_nondebug_insn_bb (rtx_insn *);\n extern rtx_insn *next_nonnote_nondebug_insn (rtx_insn *);\n+extern rtx_insn *next_nonnote_nondebug_insn_bb (rtx_insn *);\n extern rtx_insn *prev_real_insn (rtx_insn *);\n extern rtx_insn *next_real_insn (rtx);\n extern rtx_insn *prev_active_insn (rtx_insn *);\n", "prefixes": [ "1/9", "SFN" ] }