Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2226771/?format=api
{ "id": 2226771, "url": "http://patchwork.ozlabs.org/api/patches/2226771/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhup4p5wp2.gcc.gcc-TEST.pinskia.84.1.4@forge-stage.sourceware.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": "<bmm.hhup4p5wp2.gcc.gcc-TEST.pinskia.84.1.4@forge-stage.sourceware.org>", "list_archive_url": null, "date": "2026-04-22T18:49:12", "name": "[v1,04/10] fab/gimple-fold: Move removal of ASSUME internal function to gimple fold [PR121762]", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "db367c9a39668298b5d60e41ab3bfd51e5f24c4f", "submitter": { "id": 93219, "url": "http://patchwork.ozlabs.org/api/people/93219/?format=api", "name": "Andrew Pinski via Sourceware Forge", "email": "forge-bot+pinskia@forge-stage.sourceware.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/bmm.hhup4p5wp2.gcc.gcc-TEST.pinskia.84.1.4@forge-stage.sourceware.org/mbox/", "series": [ { "id": 501092, "url": "http://patchwork.ozlabs.org/api/series/501092/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501092", "date": "2026-04-22T18:49:11", "name": "remove_fab", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501092/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226771/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226771/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "gcc-patches@gcc.gnu.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)", "sourceware.org; dmarc=none (p=none dis=none)\n header.from=forge-stage.sourceware.org", "sourceware.org;\n spf=pass smtp.mailfrom=forge-stage.sourceware.org", "server2.sourceware.org;\n arc=none smtp.remote-ip=38.145.34.39" ], "Received": [ "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g18Yk6ZGGz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 05:34:34 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 1A279442B6E5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 19:34:33 +0000 (GMT)", "from forge-stage.sourceware.org (vm08.sourceware.org [38.145.34.39])\n by sourceware.org (Postfix) with ESMTPS id D326141627F3\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:50:41 +0000 (GMT)", "from forge-stage.sourceware.org (localhost [IPv6:::1])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256)\n (No client certificate requested)\n by forge-stage.sourceware.org (Postfix) with ESMTPS id A8C3943593\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 18:50:41 +0000 (UTC)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org 1A279442B6E5", "OpenDKIM Filter v2.11.0 sourceware.org D326141627F3" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D326141627F3", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D326141627F3", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776883841; cv=none;\n b=eEbYCY8JsQpqsaOhNgUZh0I3QeUbgR3vmSS0pOqGrNnQZIIGGGEHxbQEx9y4PGl/c78iaJhfgE2aAEDK+AfQbBR/rbVgbTFYaIvp7jKP4wm6Y/SMKr8UBl+qEFQInM/b8MK6EkFUVKC6QYCk6/kSLhQtdRMSJvUkR32z3+0rWLQ=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776883841; c=relaxed/simple;\n bh=KvK5wbqIhPlAbA693BgF/Jw2UyI8eT7km6otBBJtrgQ=;\n h=From:Date:Subject:To:Message-ID;\n b=hFCArZaVQa8cyN5RQfxwnavjLJi81AJphTM0mFcVni6K1EuFPOsy6veA4aDUlUXeEZoPVqoK7EZ5YKqJEoobI6FLRoRbBaguF8g7jefU8kcBI2VegHe9FCLe9HqN3r8Z7KZnZ3yWO5DckE3Aa3qJnpvqTT1Dfv4K8AKR8R/uNO8=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "From": "Andrew Pinski via Sourceware Forge\n <forge-bot+pinskia@forge-stage.sourceware.org>", "Date": "Wed, 22 Apr 2026 18:49:12 +0000", "Subject": "[PATCH v1 04/10] fab/gimple-fold: Move removal of ASSUME internal\n function to gimple fold [PR121762]", "To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>", "Message-ID": "\n <bmm.hhup4p5wp2.gcc.gcc-TEST.pinskia.84.1.4@forge-stage.sourceware.org>", "X-Mailer": "batrachomyomachia", "X-Pull-Request-Organization": "gcc", "X-Pull-Request-Repository": "gcc-TEST", "X-Pull-Request": "https://forge.sourceware.org/gcc/gcc-TEST/pulls/84", "References": "\n <bmm.hhup4p5wp2.gcc.gcc-TEST.pinskia.84.1.0@forge-stage.sourceware.org>", "In-Reply-To": "\n <bmm.hhup4p5wp2.gcc.gcc-TEST.pinskia.84.1.0@forge-stage.sourceware.org>", "X-Patch-URL": "\n https://forge.sourceware.org/pinskia/gcc-TEST/commit/1a9da1d533becd22788e346e4409352e4e24ce53", "X-BeenThere": "gcc-patches@gcc.gnu.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>", "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>", "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>", "List-Post": "<mailto:gcc-patches@gcc.gnu.org>", "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>", "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>", "Reply-To": "gcc-patches mailing list <gcc-patches@gcc.gnu.org>,\n pinskia@gcc.gnu.org", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "From: Andrew Pinski <andrew.pinski@oss.qualcomm.com>\n\nThis moves the removal of the ASSUME internal function to gimple fold.\nThe only thing is fab for -Og support until fab is removed either needs to stay\nor changed over to a fold_stmt. I decided to change over to a fold_stmt for\ninternal function calls. I am almost positive this won't change much either way.\n\nBootstrapped and tested on x86_64-linux-gnu.\n\n\tPR tree-optimization/121762\ngcc/ChangeLog:\n\n\t* gimple-fold.cc (gimple_fold_call): Remove ASSUME internal function\n\tcalls when PROP_last_full_fold is set.\n\t* tree-ssa-ccp.cc (pass_fold_builtins::execute): Handling folding\n\tof all internal functions.\n\nSigned-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>\n---\n gcc/gimple-fold.cc | 6 ++++++\n gcc/tree-ssa-ccp.cc | 29 +++++++++++++++++++++++++++--\n 2 files changed, 33 insertions(+), 2 deletions(-)", "diff": "diff --git a/gcc/gimple-fold.cc b/gcc/gimple-fold.cc\nindex 37ca0853ec82..a12fb5e8eab1 100644\n--- a/gcc/gimple-fold.cc\n+++ b/gcc/gimple-fold.cc\n@@ -5886,6 +5886,12 @@ gimple_fold_call (gimple_stmt_iterator *gsi, bool inplace)\n tree overflow = NULL_TREE;\n switch (gimple_call_internal_fn (stmt))\n \t{\n+\tcase IFN_ASSUME:\n+\t /* Remove .ASSUME calls during the last fold since it is no\n+\t longer needed. */\n+\t if (cfun->curr_properties & PROP_last_full_fold)\n+\t replace_call_with_value (gsi, NULL_TREE);\n+\t break;\n \tcase IFN_BUILTIN_EXPECT:\n \t result = fold_builtin_expect (gimple_location (stmt),\n \t\t\t\t\tgimple_call_arg (stmt, 0),\ndiff --git a/gcc/tree-ssa-ccp.cc b/gcc/tree-ssa-ccp.cc\nindex 070289ca9f0a..d2c133345cd7 100644\n--- a/gcc/tree-ssa-ccp.cc\n+++ b/gcc/tree-ssa-ccp.cc\n@@ -4297,9 +4297,34 @@ pass_fold_builtins::execute (function *fun)\n \n \t callee = gimple_call_fndecl (stmt);\n \t if (!callee\n-\t && gimple_call_internal_p (stmt, IFN_ASSUME))\n+\t && gimple_call_internal_p (stmt))\n \t {\n-\t gsi_remove (&i, true);\n+\t if (!fold_stmt (&i))\n+\t\t{\n+\t\t gsi_next (&i);\n+\t\t continue;\n+\t\t}\n+\t if (dump_file && (dump_flags & TDF_DETAILS))\n+\t\t{\n+\t\t fprintf (dump_file, \"Simplified\\n \");\n+\t\t print_gimple_stmt (dump_file, stmt, 0, dump_flags);\n+\t\t}\n+\n+\t old_stmt = stmt;\n+\t stmt = gsi_stmt (i);\n+\t update_stmt (stmt);\n+\n+\t if (maybe_clean_or_replace_eh_stmt (old_stmt, stmt)\n+\t\t && gimple_purge_dead_eh_edges (bb))\n+\t\tcfg_changed = true;\n+\n+\t if (dump_file && (dump_flags & TDF_DETAILS))\n+\t\t{\n+\t\t fprintf (dump_file, \"to\\n \");\n+\t\t print_gimple_stmt (dump_file, stmt, 0, dump_flags);\n+\t\t fprintf (dump_file, \"\\n\");\n+\t\t}\n+\t gsi_next (&i);\n \t continue;\n \t }\n \t if (!callee || !fndecl_built_in_p (callee, BUILT_IN_NORMAL))\n", "prefixes": [ "v1", "04/10" ] }