get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231320,
    "url": "http://patchwork.ozlabs.org/api/patches/2231320/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/9610e497-5bf7-43de-9e3e-e1dde4e88c42@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": "<9610e497-5bf7-43de-9e3e-e1dde4e88c42@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-30T15:41:44",
    "name": "[pushed,IRA] : Fix soft conflict and hard reg cost calculation",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2a8df5a5a52e92b43667daade003a4b34fd93232",
    "submitter": {
        "id": 4455,
        "url": "http://patchwork.ozlabs.org/api/people/4455/?format=api",
        "name": "Vladimir Makarov",
        "email": "vmakarov@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/9610e497-5bf7-43de-9e3e-e1dde4e88c42@redhat.com/mbox/",
    "series": [
        {
            "id": 502329,
            "url": "http://patchwork.ozlabs.org/api/series/502329/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502329",
            "date": "2026-04-30T15:41:44",
            "name": "[pushed,IRA] : Fix soft conflict and hard reg cost calculation",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502329/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231320/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231320/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=hfb6n2vQ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::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 (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=hfb6n2vQ",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "sourceware.org; spf=pass smtp.mailfrom=redhat.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::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 4g5z284Sfrz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 01:42:24 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id C6988436A042\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 15:42:22 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 41FB6436F3FA\n for <gcc-patches@gcc.gnu.org>; Thu, 30 Apr 2026 15:41:49 +0000 (GMT)",
            "from mail-qk1-f198.google.com (mail-qk1-f198.google.com\n [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-499-jbvQ9nbXPXKH4FB1RQanEQ-1; Thu, 30 Apr 2026 11:41:46 -0400",
            "by mail-qk1-f198.google.com with SMTP id\n af79cd13be357-8eaf1ce4a9bso243584485a.1\n for <gcc-patches@gcc.gnu.org>; Thu, 30 Apr 2026 08:41:46 -0700 (PDT)",
            "from ?IPV6:2607:f2c0:eca8:a57:559e:8217:76d2:eb22?\n ([2607:f2c0:eca8:a57:559e:8217:76d2:eb22])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8fbb10e7218sm4156285a.15.2026.04.30.08.41.44\n for <gcc-patches@gcc.gnu.org>\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Thu, 30 Apr 2026 08:41:44 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org C6988436A042",
            "OpenDKIM Filter v2.11.0 sourceware.org 41FB6436F3FA"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 41FB6436F3FA",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 41FB6436F3FA",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777563709; cv=none;\n b=np+YfuJvlPRUZj0Aaz7A7Awm3g+JX03TRnU1NQZvZ17FU2aOm/vnfzqMGfbe9UGnFOrgY5jP8DR68jH3TyXhLJEVT/cYUNubJiqpEkSvohsHcZVi8ZJNZJGNk4z4vQLts2TvCq2aFJchx7BS3ejGXdLSwQ1ZH3vHM8qCl2V9Gd4=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777563709; c=relaxed/simple;\n bh=kWYoGK6K4ELaiYlYz/IfMeXEM88uW1quE7y7WEA44Y0=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To;\n b=tiyMklhf2Bgjb12FpyQ8wA05yv0jZ8k+LMHtXdF86Fc/872uZ4dXLrrAmwKumM8n0eb6LXdPSd7Jb0WwTTGHwfsThwUvD//VjZo1DtjUkz9T0FRI05DwrmJEJeecwAOkFGOHOVrpOBaI/dDNSz6xXdOPRqMyP4j9+WpP/EOcMCc=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777563708;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type;\n bh=TvacynJ3WF1jurEHsrmD1A9KtrbjAWbAW8wecwGaRzc=;\n b=hfb6n2vQ01nvgTKuEhK7/4AGJ/Pc7UZG15ylIH4JXN8pCI2kiawvGjDHfBdbxjTUMdbCoP\n 2rOM8XL0YRJZK59ZCyS0K+0aqdYM9fyZPyVEtK+1CtAggfbDD+dZe+yBb73AQU2kbxfPZi\n zRbAXpi1CHca2qpEyhrGYrVxxHYHh8s=",
        "X-MC-Unique": "jbvQ9nbXPXKH4FB1RQanEQ-1",
        "X-Mimecast-MFC-AGG-ID": "jbvQ9nbXPXKH4FB1RQanEQ_1777563706",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777563706; x=1778168506;\n h=to:subject:from:content-language:user-agent:mime-version:date\n :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=2DlAcBbxLQrUOcz0N6o3McFEZiM4+zBAyvYbTbI+cXU=;\n b=CE+t0pSFhe+lcJtp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8LJ0P1fy\n 4Xn4Dl",
        "X-Received": [
            "by 2002:a05:620a:4483:b0:8f0:f1a5:680d with SMTP id\n af79cd13be357-8fabb6d754bmr375775485a.36.1777563706205;\n Thu, 30 Apr 2026 08:41:46 -0700 (PDT)",
            "by 2002:a05:620a:4483:b0:8f0:f1a5:680d with SMTP id\n af79cd13be357-8fabb6d754bmr375769285a.36.1777563705463;\n Thu, 30 Apr 2026 08:41:45 -0700 (PDT)"
        ],
        "Message-ID": "<9610e497-5bf7-43de-9e3e-e1dde4e88c42@redhat.com>",
        "Date": "Thu, 30 Apr 2026 11:41:44 -0400",
        "MIME-Version": "1.0",
        "User-Agent": "Mozilla Thunderbird",
        "From": "Vladimir Makarov <vmakarov@redhat.com>",
        "Subject": "[pushed][IRA]: Fix soft conflict and hard reg cost calculation",
        "To": "\"gcc-patches@gcc.gnu.org\" <gcc-patches@gcc.gnu.org>",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "V8mFcWFWO0u2ymh2HGh0fsd7ZvrAyZ_-VKP713vK_zM_1777563706",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "multipart/mixed; boundary=\"------------nv7Mpgg9tr5pazAEYmI2Ynpj\"",
        "Content-Language": "en-US",
        "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": "The reason for the patch is in its commit message.\n\nThe patch was successfully bootstrapped and tested on \nx86-64,aarch64,ppc64le.",
    "diff": "commit 0799fc00e222fcaf1d527d014b97dc5d585f4d49\nAuthor: Vladimir N. Makarov <vmakarov@redhat.com>\nDate:   Thu Apr 30 09:01:54 2026 -0400\n\n    [IRA]: Fix soft conflict and hard reg cost calculation\n    \n    When finding soft conflict in IRA, we wrongly use conflict allocno mode.\n    This can result in more shuffling on the region borders and worse code\n    generation. The patch fixes this.\n    \n    gcc/ChangeLog:\n    \n            * ira-color.cc (assign_hard_reg): Use the right allocno mode to\n            call note_conflict.\n\ndiff --git a/gcc/ira-color.cc b/gcc/ira-color.cc\nindex 279b36ef7d4..953dbd94ad8 100644\n--- a/gcc/ira-color.cc\n+++ b/gcc/ira-color.cc\n@@ -2107,8 +2107,9 @@ assign_hard_reg (ira_allocno_t a, bool retry_p)\n \t\t\t\t  full_costs[hri] += cost;\n \t\t\t\t}\n \t\t\t    };\n+\t\t\t  enum machine_mode a_mode = ALLOCNO_MODE (a);\n \t\t\t  for (int r = hard_regno;\n-\t\t\t       r >= 0 && (int) end_hard_regno (mode, r) > hard_regno;\n+\t\t\t       r >= 0 && (int) end_hard_regno (a_mode, r) > hard_regno;\n \t\t\t       r--)\n \t\t\t    note_conflict (r);\n \t\t\t  for (int r = hard_regno + 1;\n",
    "prefixes": [
        "pushed",
        "IRA"
    ]
}