get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2230352/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2230352,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2230352/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260429153858.598816-1-michiel@synopsys.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<20260429153858.598816-1-michiel@synopsys.com>",
    "date": "2026-04-29T15:38:58",
    "name": "[v2] niter: Make MAX_DOMINATORS_TO_WALK configurable at runtime",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "420d0bc9674c71b4722df62d863dc28fecd1f2ca",
    "submitter": {
        "id": 93030,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/93030/?format=api",
        "name": "Michiel Derhaeg",
        "email": "Michiel.Derhaeg@synopsys.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260429153858.598816-1-michiel@synopsys.com/mbox/",
    "series": [
        {
            "id": 502100,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502100/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502100",
            "date": "2026-04-29T15:38:58",
            "name": "[v2] niter: Make MAX_DOMINATORS_TO_WALK configurable at runtime",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/502100/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230352/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230352/checks/",
    "tags": {},
    "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=synopsys.com header.i=@synopsys.com header.a=rsa-sha256\n header.s=pfptdkimsnps header.b=NOtcCPhc;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256\n header.s=mail header.b=aET8DHJK;\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=synopsys.com header.i=@synopsys.com header.a=rsa-sha256\n header.s=pfptdkimsnps header.b=NOtcCPhc;\n\tdkim=pass (2048-bit key,\n unprotected) header.d=synopsys.com header.i=@synopsys.com header.a=rsa-sha256\n header.s=mail header.b=aET8DHJK",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=synopsys.com",
            "sourceware.org; spf=pass smtp.mailfrom=synopsys.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=148.163.158.9"
        ],
        "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 4g5M1H3ptsz1xqf\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 01:39:31 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id AE68F4BB58B6\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 15:39:29 +0000 (GMT)",
            "from mx0b-00230701.pphosted.com (mx0b-00230701.pphosted.com\n [148.163.158.9])\n by sourceware.org (Postfix) with ESMTPS id 231504BB3BDB\n for <gcc-patches@gcc.gnu.org>; Wed, 29 Apr 2026 15:39:01 +0000 (GMT)",
            "from pps.filterd (m0297265.ppops.net [127.0.0.1])\n by mx0a-00230701.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63TF2Qi94187574; Wed, 29 Apr 2026 08:39:00 -0700",
            "from smtprelay-out1.synopsys.com (smtprelay-out1.synopsys.com\n [149.117.73.133])\n by mx0a-00230701.pphosted.com (PPS) with ESMTPS id 4dug2xj2pj-1\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Wed, 29 Apr 2026 08:39:00 -0700 (PDT)",
            "from mailhost.synopsys.com (badc-mailhost4.synopsys.com\n [10.192.0.82])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits)\n client-signature RSA-PSS (2048 bits))\n (Client CN \"mailhost.synopsys.com\", Issuer \"SNPSica2\" (verified OK))\n by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 641C3401D3;\n Wed, 29 Apr 2026 15:38:59 +0000 (UTC)",
            "from us01arcgnu3.synopsys.com (us01arcgnu3.internal.synopsys.com\n [10.194.34.166])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (Client did not present a certificate)\n by mailhost.synopsys.com (Postfix) with ESMTPS id 0D889A005E;\n Wed, 29 Apr 2026 15:38:58 +0000 (UTC)",
            "by us01arcgnu3.synopsys.com (Postfix, from userid 10074339)\n id ADC8A2441D3DE; Wed, 29 Apr 2026 08:38:58 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org AE68F4BB58B6",
            "OpenDKIM Filter v2.11.0 sourceware.org 231504BB3BDB"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 231504BB3BDB",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 231504BB3BDB",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777477141; cv=none;\n b=TCWnIC8uP644mc3niiVM4sW/MEeqOHiydeKjGLvsACvf08SVdJoPrvewivbsPGP7ArUqGa1ddqbKi5cec+kJ40kc6O6Z0lcyt9Xh7wybT78EGxexZ9+FDybuY1Sn+DCA/WF0rSE4jxqKw1c379B8k7cEw/bxG5MGPrAFnKhan3k=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777477141; c=relaxed/simple;\n bh=JBg2Qb4vAShnQsWuS58YEbX/9DcuKJvm3VzptsUhB18=;\n h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-Id:\n MIME-Version;\n b=kzlmu6kJx+yYERO78T3Ad8gHqUAcArlhCNZz13D/7mt6u7kX+i1CoUJtboNfCyXrp0gHHM36Q/ll1NOlvkUs8/IAmVlqLvcxn/91pfSZUtpACdTSExvkWgW0D8i0Eg//entnI63/PoM1zx2Deu1zdGwLG3jNJivWg9Nibpb9QmE=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=synopsys.com; h=\n cc:content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=pfptdkimsnps; bh=49gXKHpH6N5U0jPTPIyN0AIUIFp63kRv\n 0P/APhvYxA0=; b=NOtcCPhcEpPc887G7h6FfsbIYTLKy+w/r+cHhplWTS4dDMaA\n fxavyPL4Np7F8Mu7HG1cvIFbvQnhIoWJ+p0Y1z/m+s10Mq7gUNqyH3nc1QRE2CO0\n XSFKmOyLg4nweFv9aYjb0ybEwej767fvL9M+leu3fWjS47kSlynV9a/AQTM0AiQz\n QCdweOMQcqZF+3F1pInwyw7xzm/akdMIJ3X8J4Jc9P2tEqY7pR2eSYVe+3ViXi+c\n +przova22mTUIOkRB+91xTurj06BPbAJLF9H44aU9NfomIbRt0UTeyfF3EiOzwEE\n taN2C0jw636phT0g8Ree9jsXrP2FgJbbd0VyiA==",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail;\n t=1777477139; bh=JBg2Qb4vAShnQsWuS58YEbX/9DcuKJvm3VzptsUhB18=;\n h=From:To:Cc:Subject:Date:From;\n b=aET8DHJKFe/e8TXAMSn8/nIS3X3rESJMpyvGNcYZjhH9FB/f9BLjJjcgk+F3HoOMZ\n 6NdIwJPJ9Sh5KzQzJmOFd8064kUM2OUgZex5E9IcZsKGUCZNCpTaK/RxlSB15v7XT3\n kacv+nv29SnOWd7WQfafpWQueYSJZgPqTRRadXGq2eY8l9B1gEJxX6UHWUgZNsggca\n dhKiFAKPbAZWA/W+Je+L2ssGiA38P3x+lSK9OMnoTw+hsFyw6ZKEIUqx9xDeu3BI8Z\n uWLV0pUbPEM3xU+CShswc/wu2AcncsQU+TBbUj9CsIb5MdmQPMxeG4X9agd627ooVE\n Q9nb7gE4Orsmw=="
        ],
        "X-SNPS-Relay": "synopsys.com",
        "From": "Michiel Derhaeg <Michiel.Derhaeg@synopsys.com>",
        "To": "richard.guenther@gmail.com",
        "Cc": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH v2] niter: Make MAX_DOMINATORS_TO_WALK configurable at runtime",
        "Date": "Wed, 29 Apr 2026 08:38:58 -0700",
        "Message-Id": "<20260429153858.598816-1-michiel@synopsys.com>",
        "X-Mailer": "git-send-email 2.37.1",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-Proofpoint-GUID": "eQKUtqmloFhBnvTOGnlDxADr_yz-YNIh",
        "X-Proofpoint-ORIG-GUID": "eQKUtqmloFhBnvTOGnlDxADr_yz-YNIh",
        "X-Authority-Analysis": "v=2.4 cv=SLZykuvH c=1 sm=1 tr=0 ts=69f22614 cx=c_pps\n a=8EbXvwLXkpGsT4ql/pYRAw==:117 a=8EbXvwLXkpGsT4ql/pYRAw==:17\n a=A5OVakUREuEA:10 a=qPHU084jO2kA:10 a=VkNPw1HP01LnGYTKEx00:22\n a=tU_645BZ7FZt8VqRJtHG:22 a=-4-sGo8i1FcW4KD7_GeR:22 a=jIQo8A4GAAAA:8\n a=Ate9leFmCymA8Bf2WNQA:9",
        "X-Proofpoint-Spam-Details-Enc": "AW1haW4tMjYwNDI5MDE1NiBTYWx0ZWRfX6ZbjlHV9tnJi\n su0OU9j7IyE5eEAeQ9PuhLwl21a84dmzou9CFbDsEhlKI/c17FaHg2XoBUCgI9FvIFwpJ6IquW4\n Paqr9uhsp7gYMlcm/fKsf8yV5XVdVhLkSOtHHlYwJYvF75dEIuVSCYM/hNMZsGmaEYnFXDFYmAG\n RBxWEvipFugPl1RD6l9Nyb+jzEeecLA0e2y6ZFwQ4nUxcgz3eXa4YOxqKZD+PSybginmqOggIk4\n 4G3voX8XS4HXWoYFlqYXfPsJGKqYY+XkxpH/K1p/ci+6SDDOLUAt3rWjVBWkiLoWcNqIgVNL9f6\n tqxhvcH4gbqSHT+FTCWMXWy+h0LnQUB8udnUMe+fLBGINXzkV9lGWCa/VfBpmScFA313yZoSFjR\n fmzneaoK9dVNzBtZl3yfMyfejG+TYrJw++oPU3YQAKoszEjcJDvAllWJLGigLLzvatdsGcS2apA\n +NUkGx8aI8eguviNp6g==",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-29_01,2026-04-28_01,2025-10-01_01",
        "X-Proofpoint-Spam-Details": "rule=outbound_active_cloned_notspam\n policy=outbound_active_cloned score=0 priorityscore=1501 lowpriorityscore=0\n suspectscore=0 phishscore=0 adultscore=0 malwarescore=0 bulkscore=0\n clxscore=1011 impostorscore=0 spamscore=0 classifier=typeunknown authscore=0\n authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1\n engine=8.22.0-2604200000 definitions=main-2604290156",
        "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": "MAX_DOMINATORS_TO_WALK can be too small for very large function bodies.\nMade it an option such that we can increase the value when needed.\n\ngcc/ChangeLog:\n\n        * doc/params.texi: Added --param=max-niter-dominators-walk.\n        * params.opt: Added --param=max-niter-dominators-walk.\n        * tree-ssa-loop-niter.cc (MAX_DOMINATORS_TO_WALK): Removed.\n        (determine_value_range): Updated.\n        (bound_difference): Updated.\n        (simplify_using_initial_conditions): Updated.\n\nSigned-off-by: Michiel Derhaeg <michiel@synopsys.com>\n---\nv2: Updated params.texi.\n\n gcc/doc/params.texi        |  5 +++++\n gcc/params.opt             |  4 ++++\n gcc/tree-ssa-loop-niter.cc | 14 ++++++--------\n 3 files changed, 15 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/gcc/doc/params.texi b/gcc/doc/params.texi\nindex 31b04688cf7..e6c89607e0d 100644\n--- a/gcc/doc/params.texi\n+++ b/gcc/doc/params.texi\n@@ -889,6 +889,11 @@ protection when @option{-fstack-protector} is used.\n The minimum size of variables taking part in stack slot sharing when not\n optimizing.\n \n+@paindex max-niter-dominators-walk\n+@item max-niter-dominators-walk\n+Maximum number of dominators BBs to walk when simplifying loop bounds\n+and conditions.\n+\n @paindex max-jump-thread-duplication-stmts\n @item max-jump-thread-duplication-stmts\n Maximum number of statements allowed in a block that needs to be\ndiff --git a/gcc/params.opt b/gcc/params.opt\nindex b35ca688cdf..9eeb1f3fa64 100644\n--- a/gcc/params.opt\n+++ b/gcc/params.opt\n@@ -674,6 +674,10 @@ Bound on the cost of an expression to compute the number of iterations.\n Common Joined UInteger Var(param_max_iterations_to_track) Init(1000) Param Optimization\n Bound on the number of iterations the brute force # of iterations analysis algorithm evaluates.\n \n+-param=max-niter-dominators-walk=\n+Common Joined UInteger Var(param_max_niter_dominators_walk) Init(8) IntegerRange(1, 1024) Param Optimization\n+Maximum number of dominators BBs to walk when simplifying loop bounds and conditions.\n+\n -param=max-jump-thread-duplication-stmts=\n Common Joined UInteger Var(param_max_jump_thread_duplication_stmts) Init(15) Param Optimization\n Maximum number of statements allowed in a block that needs to be duplicated when threading jumps.\ndiff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc\nindex 00c4a9c81f8..c39401147ae 100644\n--- a/gcc/tree-ssa-loop-niter.cc\n+++ b/gcc/tree-ssa-loop-niter.cc\n@@ -48,11 +48,6 @@ along with GCC; see the file COPYING3.  If not see\n #include \"sreal.h\"\n \n \n-/* The maximum number of dominator BBs we search for conditions\n-   of loop header copies we use for simplifying a conditional\n-   expression.  */\n-#define MAX_DOMINATORS_TO_WALK 8\n-\n /*\n \n    Analysis of number of iterations of an affine exit test.\n@@ -441,7 +436,8 @@ determine_value_range (class loop *loop, tree type, tree var, mpz_t off,\n       /* Now walk the dominators of the loop header and use the entry\n \t guards to refine the estimates.  */\n       for (bb = loop->header;\n-\t   bb != ENTRY_BLOCK_PTR_FOR_FN (cfun) && cnt < MAX_DOMINATORS_TO_WALK;\n+\t   bb != ENTRY_BLOCK_PTR_FOR_FN (cfun)\n+\t     && cnt < param_max_niter_dominators_walk;\n \t   bb = get_immediate_dominator (CDI_DOMINATORS, bb))\n \t{\n \t  edge e;\n@@ -769,7 +765,8 @@ bound_difference (class loop *loop, tree x, tree y, bounds *bnds)\n   /* Now walk the dominators of the loop header and use the entry\n      guards to refine the estimates.  */\n   for (bb = loop->header;\n-       bb != ENTRY_BLOCK_PTR_FOR_FN (cfun) && cnt < MAX_DOMINATORS_TO_WALK;\n+       bb != ENTRY_BLOCK_PTR_FOR_FN (cfun)\n+\t && cnt < param_max_niter_dominators_walk;\n        bb = get_immediate_dominator (CDI_DOMINATORS, bb))\n     {\n       if (!single_pred_p (bb))\n@@ -3100,7 +3097,8 @@ simplify_using_initial_conditions (class loop *loop, tree expr)\n      the number of BBs times the number of loops in degenerate\n      cases.  */\n   for (bb = loop->header;\n-       bb != ENTRY_BLOCK_PTR_FOR_FN (cfun) && cnt < MAX_DOMINATORS_TO_WALK;\n+       bb != ENTRY_BLOCK_PTR_FOR_FN (cfun)\n+\t && cnt < param_max_niter_dominators_walk;\n        bb = get_immediate_dominator (CDI_DOMINATORS, bb))\n     {\n       if (!single_pred_p (bb))\n",
    "prefixes": [
        "v2"
    ]
}