get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 818279,
    "url": "http://patchwork.ozlabs.org/api/patches/818279/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/b0855102-fb3e-ba64-a4a5-1f058fb7a38e@mentor.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": "<b0855102-fb3e-ba64-a4a5-1f058fb7a38e@mentor.com>",
    "list_archive_url": null,
    "date": "2017-09-25T14:57:52",
    "name": "Pretty-print GOACC_REDUCTION arguments",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "cc467b8e5717c6c4877665ff8d70fe394de61406",
    "submitter": {
        "id": 9225,
        "url": "http://patchwork.ozlabs.org/api/people/9225/?format=api",
        "name": "Tom de Vries",
        "email": "Tom_deVries@mentor.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/b0855102-fb3e-ba64-a4a5-1f058fb7a38e@mentor.com/mbox/",
    "series": [
        {
            "id": 4979,
            "url": "http://patchwork.ozlabs.org/api/series/4979/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=4979",
            "date": "2017-09-25T14:57:52",
            "name": "Pretty-print GOACC_REDUCTION arguments",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4979/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/818279/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/818279/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-462899-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-462899-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=\"PHJQIgHL\"; dkim-atps=neutral",
            "sourceware.org; auth=none"
        ],
        "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 3y16dz1Ctdz9t67\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 26 Sep 2017 00:58:14 +1000 (AEST)",
            "(qmail 93146 invoked by alias); 25 Sep 2017 14:58:05 -0000",
            "(qmail 93132 invoked by uid 89); 25 Sep 2017 14:58:04 -0000",
            "from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131)\n\tby sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with\n\tESMTP; Mon, 25 Sep 2017 14:58:02 +0000",
            "from nat-ies.mentorg.com ([192.94.31.2]\n\thelo=SVR-IES-MBX-04.mgc.mentorg.com)\tby relay1.mentorg.com\n\twith esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256)\tid\n\t1dwUpb-0001Ul-C4 from Tom_deVries@mentor.com for\n\tgcc-patches@gcc.gnu.org; Mon, 25 Sep 2017 07:57:59 -0700",
            "from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com\n\t(139.181.222.4) with Microsoft SMTP Server (TLS) id\n\t15.0.1263.5; Mon, 25 Sep 2017 15:57:55 +0100"
        ],
        "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:to\n\t:from:subject:message-id:date:mime-version:content-type; q=dns;\n\ts=default; b=dnKqX856hecME0z2S/e1vITIs+A0t0f2dBNEFWQkbGRJFUqzTI\n\t4Crev6LUWUZRbyAkI+Q4EGn4IcH5M3DucExOR/C9HufjzQJQK7JmSHO/pavUwPCT\n\tn5TKa7Rr3Urps/IJS1ONcmB4pFIk/2qrwVaAV5YPRRynjcHEqfcBc5ssk=",
        "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:to\n\t:from:subject:message-id:date:mime-version:content-type; s=\n\tdefault; bh=89jr/dCsabjPZn34jSbxPKY0GRM=; b=PHJQIgHLYBjnSqrzyyxy\n\tLMYSNCOZDi5rv5clbHBQJPM0XTs50qBMwrCEAzgFRu/JvaPycmAfFa8cBp66SZMu\n\tjtCQ3YTnew45YppTUcfMgNwqEujsxE3YMi96knzmwX/JX5B2jSH/x82J/80QRrdi\n\tQtd3S57MNOMQTJLhXdsFZ0E=",
        "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=-24.6 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tRCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:2119,\n\tSETUP, 7656, rcode",
        "X-HELO": "relay1.mentorg.com",
        "To": "GCC Patches <gcc-patches@gcc.gnu.org>",
        "From": "Tom de Vries <Tom_deVries@mentor.com>",
        "Subject": "[PATCH] Pretty-print GOACC_REDUCTION arguments",
        "Message-ID": "<b0855102-fb3e-ba64-a4a5-1f058fb7a38e@mentor.com>",
        "Date": "Mon, 25 Sep 2017 16:57:52 +0200",
        "User-Agent": "Mozilla/5.0 (X11; Linux x86_64;\n\trv:52.0) Gecko/20100101 Thunderbird/52.3.0",
        "MIME-Version": "1.0",
        "Content-Type": "multipart/mixed;\n\tboundary=\"------------22A0E93FA655D19272417965\"",
        "X-ClientProxiedBy": "svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tSVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4)"
    },
    "content": "Hi,\n\ncurrently for a GOACC_REDUCTION internal fn call we print:\n...\n   sum_5 = GOACC_REDUCTION (SETUP, _3, 0, 0, 67, 0);\n...\n\nThis patch adds a comment for some arguments explaining the meaning of \nthe argument:\n...\n       sum_5 = GOACC_REDUCTION (SETUP, _3, 0, 0 /*gang*/, 67 /*+*/, 0);\n...\n\nOK for trunk, if testing is ok?\n\nThanks,\n- Tom",
    "diff": "Pretty-print GOACC_REDUCTION arguments\n\nPrints\n  sum_5 = GOACC_REDUCTION (SETUP, _3, 0, 0 /*gang*/, 67 /*+*/, 0);\ninstead of\n  sum_5 = GOACC_REDUCTION (SETUP, _3, 0, 0, 67, 0);\n\n2017-09-25  Tom de Vries  <tom@codesourcery.com>\n\n\t* gimple-pretty-print.c (dump_gimple_call_args): Pretty-print\n\tGOACC_REDUCTION arguments.\n\n---\n gcc/gimple-pretty-print.c | 35 +++++++++++++++++++++++++++++++++++\n 1 file changed, 35 insertions(+)\n\ndiff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c\nindex ed8e51c..61efd93 100644\n--- a/gcc/gimple-pretty-print.c\n+++ b/gcc/gimple-pretty-print.c\n@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3.  If not see\n #include \"stringpool.h\"\n #include \"attribs.h\"\n #include \"asan.h\"\n+#include \"gomp-constants.h\"\n \n #define INDENT(SPACE)\t\t\t\t\t\t\t\\\n   do { int i; for (i = 0; i < SPACE; i++) pp_space (buffer); } while (0)\n@@ -765,6 +766,40 @@ dump_gimple_call_args (pretty_printer *buffer, gcall *gs, dump_flags_t flags)\n       if (i)\n \tpp_string (buffer, \", \");\n       dump_generic_node (buffer, gimple_call_arg (gs, i), 0, flags, false);\n+\n+      if (gimple_call_internal_p (gs))\n+\tswitch (gimple_call_internal_fn (gs))\n+\t  {\n+\t  case IFN_GOACC_REDUCTION:\n+\t    switch (i)\n+\t      {\n+\t      case 3:\n+\t\tswitch (tree_to_uhwi (gimple_call_arg (gs, i)))\n+\t\t  {\n+\t\t  case GOMP_DIM_GANG:\n+\t\t    pp_string (buffer, \" /*gang*/\");\n+\t\t    break;\n+\t\t  case GOMP_DIM_WORKER:\n+\t\t    pp_string (buffer, \" /*worker*/\");\n+\t\t    break;\n+\t\t  case GOMP_DIM_VECTOR:\n+\t\t    pp_string (buffer, \" /*vector*/\");\n+\t\t    break;\n+\t\t  default:\n+\t\t    gcc_unreachable ();\n+\t\t  }\n+\t\tbreak;\n+\t      case 4:\n+\t\t{\n+\t\t  enum tree_code rcode\n+\t\t    = (enum tree_code)tree_to_uhwi (gimple_call_arg (gs, i));\n+\t\t  pp_string (buffer, \" /*\");\n+\t\t  pp_string (buffer, op_symbol_code (rcode));\n+\t\t  pp_string (buffer, \"*/\");\n+\t\t}\n+\t\tbreak;\n+\t      }\n+\t  }\n     }\n \n   if (gimple_call_va_arg_pack_p (gs))\n",
    "prefixes": []
}