Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/2233236/?format=api
{ "id": 2233236, "url": "http://patchwork.ozlabs.org/api/1.2/patches/2233236/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260505223045.347444-3-feedabl3@gmail.com/", "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": "<20260505223045.347444-3-feedabl3@gmail.com>", "list_archive_url": null, "date": "2026-05-05T22:30:44", "name": "[RFC,1/3] df: Add support for pseudos in function arguments", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "8e98de7808884c9c77a375958de2cf3f598cde96", "submitter": { "id": 92146, "url": "http://patchwork.ozlabs.org/api/1.2/people/92146/?format=api", "name": "feedable", "email": "feedabl3@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260505223045.347444-3-feedabl3@gmail.com/mbox/", "series": [ { "id": 502902, "url": "http://patchwork.ozlabs.org/api/1.2/series/502902/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502902", "date": "2026-05-05T22:30:44", "name": "wasm: New backend", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/502902/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2233236/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2233236/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\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=WMnSKdT5;\n\tdkim-atps=neutral", "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;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=WMnSKdT5", "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "sourceware.org; spf=pass smtp.mailfrom=gmail.com", "server2.sourceware.org;\n arc=none smtp.remote-ip=2a00:1450:4864:20::336" ], "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 4g9CtD2brqz1yJq\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 06 May 2026 08:31:46 +1000 (AEST)", "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D38744BA23F3\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 5 May 2026 22:31:44 +0000 (GMT)", "from mail-wm1-x336.google.com (mail-wm1-x336.google.com\n [IPv6:2a00:1450:4864:20::336])\n by sourceware.org (Postfix) with ESMTPS id 854E94BA2E09\n for <gcc-patches@gcc.gnu.org>; Tue, 5 May 2026 22:31:10 +0000 (GMT)", "by mail-wm1-x336.google.com with SMTP id\n 5b1f17b1804b1-48374014a77so68144855e9.3\n for <gcc-patches@gcc.gnu.org>; Tue, 05 May 2026 15:31:10 -0700 (PDT)", "from 7a38.moduleworks.com\n ([2a02:8308:900b:fc00:1c70:a43b:cde8:2b29])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-48e53559d8esm79055e9.9.2026.05.05.15.31.08\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 05 May 2026 15:31:08 -0700 (PDT)" ], "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 sourceware.org D38744BA23F3", "OpenDKIM Filter v2.11.0 sourceware.org 854E94BA2E09" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 854E94BA2E09", "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 854E94BA2E09", "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1778020270; cv=none;\n b=i6NulD0XnRL1eh90sMEzfmxKkXVhIcze9mCxbyEGxRf/1MwFfEWlRt8dJX8ycJ6mfueuG2vsnSw62Hh0mD8nYPr7MpdFroXYFEnpxzsF6sLn56qdJscUC8PHalVdqbA1ha4rhwzy2u82DBNPS1XQxy/9OG4vhT4rv+gxXz4j7OA=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1778020270; c=relaxed/simple;\n bh=dMOEK9ROcgynPbQCaE7jhepBKPQz9OBPWOVD1U6l+5g=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=Beb7xDFKcFkgiz1148Kfi1BiMo5YP03o5Le8qlL+473Q8Td083dxO5wfMFdHAaB6zqEqT4/y9hJntgkqzZ5T8SdTC/8/1bzue4lkeCusdGj0nf9nDkX+vgBCMHsmEhuCn3m6cQVfxb7Cl3HkKQqLQSAH7e48YYKDl6tP9s7P3zo=", "ARC-Authentication-Results": "i=1; server2.sourceware.org", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1778020269; x=1778625069; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=NzBurjs+9H7fUsUrdIRVFxshmTp4DLlFth46UEx6zK0=;\n b=WMnSKdT5NDfvD+i4uA8rOlrCvQHmH1cO/CCTLFlUTaUja4t8PswLcMT6asMZx9Jdbz\n lZtzFbVOoaDxkdcd5AtaOBTCD0OthVAtebQLyuVNrFjo/0LIflaSumyyDkTllP0jrcsW\n Fl0ckgr75h/7rYeuyg4PWDAixirLCLz9KmxnNHHOKQTgkRwPKkT3qQEersGHI8sQR7Qt\n kG7nUbhuqsQaOolZBZX4ouzbJP71UKz89YTR+ZJFkA4qSKj7InsoK+sr4y0AL66jN5XU\n xnEOdg56uJyFIsip5F+doYy/iu/aaRqNFWcmumqv992xdpRd6GLLFZm85ojuUciuxito\n c1bg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778020269; x=1778625069;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=NzBurjs+9H7fUsUrdIRVFxshmTp4DLlFth46UEx6zK0=;\n b=cDVsSwla4hJTm4Mdmlit5KPAXjQswxwSbrUYsHqgXZXC/7tyNP3Fet9Uj0dp32fJXk\n dJ9fqI79pkHS1uszX3ZcENUJjeoYyucMhaSQ8yTr1kyAJhRQxFknsSg0scYtklpCQvEV\n 3BxPf0j5lYwBAxpzk/awYBADR9jc4cAVP+uvu+AzQs0xNDAn4lzqOBnM8Bsi3eh+I6rz\n 0fsyU57NgoxlFUvVRFevjldu4CmNYLFrwIT5LL9bqK2DX1oQNEjCtdf2ovSfvNkjksJW\n cU1p53nUZBR8n3g9pLxB2Fk9bVhF/fhsEYHnqsR43fueN0UPCBxBH6agxopFqbqL71gn\n YCjA==", "X-Gm-Message-State": "AOJu0YxTP+bvlevSTwXBpth9HyxDJ6LfTaq0OWrqOiZ82DWqKNV6BFb+\n kO9Ijdkdfgo7uEaqXF54xnnDcdn4fWqFDFauFzw3rIRmjZJaz6ygD8TPBRjGNw==", "X-Gm-Gg": "AeBDieufJbx/29jLRGKt5+f3Wa/ZMURoTd50HWQcjNW2UxOIHKGqxaoxMb9xBbIo0V7\n XrWG+BXxicdkRxot4foTz/b+gKZmUWeRyD7YSMKOMD02nkq3tmVMmw6uraDmCyrT6Hx66CruR86\n 3ZTO0HK1V/q7FzVAw0gU/kh0eB6PBhYcXZYqS7De+0rOD0dVmF7XFiBdGqIlgoQcpxpNyrjsjE7\n w1BwtAXMhnPqORjq0R+YWW8tJwIGL+sahyeQaXbHG1VTKdjsx8GWbXc366Ifr9Xsxl1INolU7jk\n 6RlZH/W7owaEdJmKNmA2BQXwV5GFh7Th3lMeZU6dn5mkitF1Q+eF/D0DnavsuNFdyDhOLrWwDjL\n /CqbLYM84Q6FTMxKH6AfzoXfYjd36ZDTkygnetnCSA3S7KsuvL+e6GZMh4LL/5T51ImypN0kxb3\n mVKzDKTFkAR8vKgofFN7gIs2qKMgAcmON9r0cHTq79Zs6mkq3l", "X-Received": "by 2002:a05:600c:3548:b0:489:1c1f:35f1 with SMTP id\n 5b1f17b1804b1-48e51e09706mr16778185e9.4.1778020269308;\n Tue, 05 May 2026 15:31:09 -0700 (PDT)", "From": "feedable <feedabl3@gmail.com>", "To": "gcc-patches@gcc.gnu.org", "Cc": "feedable <feedabl3@gmail.com>", "Subject": "[RFC PATCH 1/3] df: Add support for pseudos in function arguments", "Date": "Wed, 6 May 2026 01:30:44 +0300", "Message-ID": "<20260505223045.347444-3-feedabl3@gmail.com>", "X-Mailer": "git-send-email 2.54.0", "In-Reply-To": "<20260505223045.347444-2-feedabl3@gmail.com>", "References": "<20260505223045.347444-2-feedabl3@gmail.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "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>", "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org" }, "content": "Targets with vitual registers would like to use virtual registers as arguments\nsame way usual targets use hard registers. This patch relaxes assertions that\nprevent that from happening. It also introduces a new hook,\nTARGET_MARK_ARG_REGNOS, which is supposed to tell df which pseudos are args.\n\ngcc/ChangeLog:\n\n\t* df-problems.cc (df_word_lr_bb_local_compute): Patch assert to accept\n\tpseudo registers as args.\n\t* expr.cc (use_regs): Likewise.\n\t* df-scan.cc (df_get_entry_block_def_set): Inboke the hook to mark arg\n\tpseudos.\n\t* target.def: Introduce a hook to mark vreg args.\n\t* doc/tm.texi.in: Document the new hook.\n\t* doc/tm.texi: Likewise.\n---\n gcc/df-problems.cc | 6 ++++--\n gcc/df-scan.cc | 4 ++++\n gcc/doc/tm.texi | 5 +++++\n gcc/doc/tm.texi.in | 2 ++\n gcc/expr.cc | 3 ++-\n gcc/target.def | 7 +++++++\n 6 files changed, 24 insertions(+), 3 deletions(-)", "diff": "diff --git a/gcc/df-problems.cc b/gcc/df-problems.cc\nindex 710f3c12032..70b44c546d4 100644\n--- a/gcc/df-problems.cc\n+++ b/gcc/df-problems.cc\n@@ -2954,9 +2954,11 @@ df_word_lr_bb_local_compute (unsigned int bb_index)\n rtx_insn *insn;\n df_ref def, use;\n \n- /* Ensure that artificial refs don't contain references to pseudos. */\n+ /* Ensure that artificial refs don't contain references to pseudos.\n+ Do allow pseudos as args, though. */\n FOR_EACH_ARTIFICIAL_DEF (def, bb_index)\n- gcc_assert (DF_REF_REGNO (def) < FIRST_PSEUDO_REGISTER);\n+ gcc_assert (DF_REF_REGNO (def) < FIRST_PSEUDO_REGISTER\n+ || bitmap_bit_p (df->entry_block_defs, DF_REF_REGNO (def)));\n \n FOR_EACH_ARTIFICIAL_USE (use, bb_index)\n gcc_assert (DF_REF_REGNO (use) < FIRST_PSEUDO_REGISTER);\ndiff --git a/gcc/df-scan.cc b/gcc/df-scan.cc\nindex c6a5053ddbb..5cc8f2e1a46 100644\n--- a/gcc/df-scan.cc\n+++ b/gcc/df-scan.cc\n@@ -3500,6 +3500,10 @@ df_get_entry_block_def_set (bitmap entry_block_defs)\n \tbitmap_set_bit (entry_block_defs, INCOMING_REGNO (i));\n }\n \n+ /* Whatever the target considers to be an argument */\n+ if (targetm.calls.mark_arg_regnos)\n+ targetm.calls.mark_arg_regnos (entry_block_defs);\n+\n /* The always important stack pointer. */\n bitmap_set_bit (entry_block_defs, STACK_POINTER_REGNUM);\n \ndiff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi\nindex 2832a447e3e..692794087dd 100644\n--- a/gcc/doc/tm.texi\n+++ b/gcc/doc/tm.texi\n@@ -4507,6 +4507,11 @@ return a different value if an argument size must be rounded to a larger\n value.\n @end deftypefn\n \n+@deftypefn {Target Hook} void TARGET_MARK_ARG_REGNOS (bitmap @var{regs})\n+Useful for TARGET_NO_REGISTER_ALLOCATION targets, define this to mark all\n+ the pseudos that hold the current function arguments.\n+@end deftypefn\n+\n @defmac FUNCTION_ARG_REGNO_P (@var{regno})\n A C expression that is nonzero if @var{regno} is the number of a hard\n register in which function arguments are sometimes passed. This does\ndiff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in\nindex 274bb899d0c..afdd9f2bf8d 100644\n--- a/gcc/doc/tm.texi.in\n+++ b/gcc/doc/tm.texi.in\n@@ -3465,6 +3465,8 @@ required.\n \n @hook TARGET_FUNCTION_ARG_ROUND_BOUNDARY\n \n+@hook TARGET_MARK_ARG_REGNOS\n+\n @defmac FUNCTION_ARG_REGNO_P (@var{regno})\n A C expression that is nonzero if @var{regno} is the number of a hard\n register in which function arguments are sometimes passed. This does\ndiff --git a/gcc/expr.cc b/gcc/expr.cc\nindex 7ca5dd84ce9..78a3f68440d 100644\n--- a/gcc/expr.cc\n+++ b/gcc/expr.cc\n@@ -3789,7 +3789,8 @@ use_regs (rtx *call_fusage, int regno, int nregs)\n {\n int i;\n \n- gcc_assert (regno + nregs <= FIRST_PSEUDO_REGISTER);\n+ gcc_assert (regno + nregs <= FIRST_PSEUDO_REGISTER\n+ || targetm.no_register_allocation);\n \n for (i = 0; i < nregs; i++)\n use_reg (call_fusage, regno_reg_rtx[regno + i]);\ndiff --git a/gcc/target.def b/gcc/target.def\nindex 11b358f4160..71e45c6c3a2 100644\n--- a/gcc/target.def\n+++ b/gcc/target.def\n@@ -5378,6 +5378,13 @@ value.\",\n unsigned int, (machine_mode mode, const_tree type),\n default_function_arg_round_boundary)\n \n+DEFHOOK\n+(mark_arg_regnos,\n+ \"Useful for TARGET_NO_REGISTER_ALLOCATION targets, define this to mark all\\n\\\n+ the pseudos that hold the current function arguments.\",\n+ void, (bitmap regs),\n+ NULL)\n+\n /* Return the diagnostic message string if function without a prototype\n is not allowed for this 'val' argument; NULL otherwise. */\n DEFHOOK\n", "prefixes": [ "RFC", "1/3" ] }