Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/808499/?format=api
{ "id": 808499, "url": "http://patchwork.ozlabs.org/api/patches/808499/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170901011500.15345-6-aoliva@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": "<20170901011500.15345-6-aoliva@redhat.com>", "list_archive_url": null, "date": "2017-09-01T01:14:57", "name": "[6/9,LVU] Allow final_start_function to skip initial insns", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "1cd0bbb77be3495afea4dde5a9c564f4110cfb60", "submitter": { "id": 2058, "url": "http://patchwork.ozlabs.org/api/people/2058/?format=api", "name": "Alexandre Oliva", "email": "aoliva@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170901011500.15345-6-aoliva@redhat.com/mbox/", "series": [ { "id": 934, "url": "http://patchwork.ozlabs.org/api/series/934/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=934", "date": "2017-09-01T01:14:52", "name": "[1/9,SFN] adjust RTL insn-walking API", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/934/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/808499/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/808499/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461243-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-461243-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=\"KVsxvjCI\"; dkim-atps=neutral", "sourceware.org; auth=none", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx06.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=aoliva@redhat.com" ], "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 3xk1Yh58RXz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 1 Sep 2017 11:17:12 +1000 (AEST)", "(qmail 95763 invoked by alias); 1 Sep 2017 01:16:06 -0000", "(qmail 95094 invoked by uid 89); 1 Sep 2017 01:16:02 -0000", "from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tFri, 01 Sep 2017 01:15:59 +0000", "from smtp.corp.redhat.com\n\t(int-mx03.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.13])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id 9CD80356CE;\n\tFri, 1 Sep 2017 01:15:57 +0000 (UTC)", "from freie.home (ovpn04.gateway.prod.ext.phx2.redhat.com\n\t[10.5.9.4])\tby smtp.corp.redhat.com (Postfix) with ESMTPS id\n\t39924BF650; Fri, 1 Sep 2017 01:15:57 +0000 (UTC)", "from frit.home (frit.home [172.31.160.7])\tby freie.home\n\t(8.15.2/8.15.2) with ESMTP id v811FZOj009211;\n\tThu, 31 Aug 2017 22:15:42 -0300" ], "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:from\n\t:to:cc:subject:date:message-id:in-reply-to:references; q=dns; s=\n\tdefault; b=YlAYcOjOaBLIEvaJnhY1W/Vvx6gzgE0r+Ogp7PM5c/Rvb0ahPrOlY\n\tdTQ/etP+iCUbR6Lsu7v2edIlls433RPipshS93rmFxCWlY1D8ZjkmohowmJbtQ8H\n\taA2j0W3t6ZAZO4XnYzeMPaJWU/yOa1BwpPryKH5XpXu7cNShOpxupI=", "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:from\n\t:to:cc:subject:date:message-id:in-reply-to:references; s=\n\tdefault; bh=peQontbTBfGVGlqoI8pzLmYIJ4w=; b=KVsxvjCIZ5wxWPNYdXhe\n\tcMI7RT8Xr9KKcjfoo4m0UFbuXYpuMVcA2weASkr9miKGuVwQwncEG7C1SqZKx+4U\n\tN/uIsEErWbziray/ta96qvvA3FqcxE5GEyEn1zAFXbpA/xQmnZ19GFLOQyqSK0Yl\n\tmOjK6dPdDMhfQgsg+ZxGO2A=", "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=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0,\n\tGIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD,\n\tSPF_HELO_PASS autolearn=ham version=3.3.2 spammy=", "X-HELO": "mx1.redhat.com", "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 9CD80356CE", "From": "Alexandre Oliva <aoliva@redhat.com>", "To": "Richard Biener <richard.guenther@gmail.com>", "Cc": "GCC Patches <gcc-patches@gcc.gnu.org>,\n\tAlexandre Oliva <aoliva@redhat.com>", "Subject": "[PATCH 6/9] [LVU] Allow final_start_function to skip initial insns", "Date": "Thu, 31 Aug 2017 22:14:57 -0300", "Message-Id": "<20170901011500.15345-6-aoliva@redhat.com>", "In-Reply-To": "<orr2vrns5k.fsf@lxoliva.fsfla.org>", "References": "<orr2vrns5k.fsf@lxoliva.fsfla.org>" }, "content": "This API change will enable final_start_function() to \"consume\"\ninitial insns, and choose the first insn to be passed to final().\n\nMany ports call final_start_function() and final() when creating\nthunks and whatnot, so they needed adjusting.\n\nfor gcc/ChangeLog\n\n\t* output.h (final_start_function): Adjust.\n\t* final.c (final_start_function): Take pointer to FIRST.\n\t(rest_of_handle_final): Adjust.\n\t* config/aarch64/aarch64.c (aarch64_output_mi_thunk): Adjust.\n\t* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.\n\t* config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.\n\t(arm32_output_mi_thunk): Likewise.\n\t* config/cris/cris.c (cris_asm_output_mi_thunk): Likewise.\n\t* config/i386/i386.c (ix86_code_end): Likewise.\n\t(x86_output_mi_thunk): Likewise.\n\t* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.\n\t* config/m68k/m68k.c (m68k_output_mi_thunk): Likewise.\n\t* config/microblaze/microblaze.c (microblaze_asm_output_mi_thunk):\n\tLikewise.\n\t* config/mips/mips.c (mips_output_mi_thunk): Likewise.\n\t* config/nds32/nds32.c (nds32_asm_output_mi_thunk): Likewise.\n\t* config/nios2/nios2.c (nios2_asm_output_mi_thunk): Likewise.\n\t* config/pa/pa.c (pa_asm_output_mi_thunk): Likewise.\n\t* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.\n\t(rs6000_code_end): Likewise.\n\t* config/s390/s390.c (s390_output_mi_thunk): Likewise.\n\t* config/sh/sh.c (sh_output_mi_thunk): Likewise.\n\t* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.\n\t* config/spu/spu.c (spu_output_mi_thunk): Likewise.\n\t* config/tilegx/tilegx.c (tilegx_output_mi_thunk): Likewise.\n\t* config/tilepro/tilepro.c (tilepro_asm_output_mi_thunk): Likewise.\n---\n gcc/config/aarch64/aarch64.c | 2 +-\n gcc/config/alpha/alpha.c | 2 +-\n gcc/config/arm/arm.c | 5 +++--\n gcc/config/cris/cris.c | 3 ++-\n gcc/config/i386/i386.c | 5 +++--\n gcc/config/ia64/ia64.c | 2 +-\n gcc/config/m68k/m68k.c | 2 +-\n gcc/config/microblaze/microblaze.c | 2 +-\n gcc/config/mips/mips.c | 2 +-\n gcc/config/nds32/nds32.c | 3 ++-\n gcc/config/nios2/nios2.c | 2 +-\n gcc/config/pa/pa.c | 3 ++-\n gcc/config/rs6000/rs6000.c | 5 +++--\n gcc/config/s390/s390.c | 3 ++-\n gcc/config/sh/sh.c | 2 +-\n gcc/config/sparc/sparc.c | 2 +-\n gcc/config/spu/spu.c | 3 ++-\n gcc/config/tilegx/tilegx.c | 2 +-\n gcc/config/tilepro/tilepro.c | 2 +-\n gcc/final.c | 9 ++++++---\n gcc/output.h | 2 +-\n 21 files changed, 37 insertions(+), 26 deletions(-)", "diff": "diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c\nindex 28c4e0e..51584f5 100644\n--- a/gcc/config/aarch64/aarch64.c\n+++ b/gcc/config/aarch64/aarch64.c\n@@ -3936,7 +3936,7 @@ aarch64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,\n \n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c\nindex e13c5f9..c158f7a 100644\n--- a/gcc/config/alpha/alpha.c\n+++ b/gcc/config/alpha/alpha.c\n@@ -8461,7 +8461,7 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n assemble_start_function and assemble_end_function. */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n }\ndiff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c\nindex fa3e2fa..71a0d2d 100644\n--- a/gcc/config/arm/arm.c\n+++ b/gcc/config/arm/arm.c\n@@ -26357,7 +26357,8 @@ arm_thumb1_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,\n if (mi_delta < 0)\n mi_delta = - mi_delta;\n \n- final_start_function (emit_barrier (), file, 1);\n+ rtx_insn *first = emit_barrier ();\n+ final_start_function (&first, file, 1);\n \n if (TARGET_THUMB1)\n {\n@@ -26534,7 +26535,7 @@ arm32_output_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,\n \n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c\nindex b57881a..376c1eb 100644\n--- a/gcc/config/cris/cris.c\n+++ b/gcc/config/cris/cris.c\n@@ -2744,7 +2744,8 @@ cris_asm_output_mi_thunk (FILE *stream,\n \t\t\t tree funcdecl)\n {\n /* Make sure unwind info is emitted for the thunk if needed. */\n- final_start_function (emit_barrier (), stream, 1);\n+ rtx_insn *first = emit_barrier ();\n+ final_start_function (&first, stream, 1);\n \n if (delta > 0)\n fprintf (stream, \"\\tadd%s \" HOST_WIDE_INT_PRINT_DEC \",$%s\\n\",\ndiff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c\nindex 1d88e4f..86320a7 100644\n--- a/gcc/config/i386/i386.c\n+++ b/gcc/config/i386/i386.c\n@@ -12492,8 +12492,9 @@ ix86_code_end (void)\n \t emitting it directly; tell them we're a thunk, if they care. */\n cfun->is_thunk = true;\n first_function_block_is_cold = false;\n+ rtx_insn *first = emit_barrier ();\n /* Make sure unwind info is emitted for the thunk if needed. */\n- final_start_function (emit_barrier (), asm_out_file, 1);\n+ final_start_function (&first, asm_out_file, 1);\n \n /* Pad stack IP move with 4 instructions (two NOPs count\n \t as one instruction). */\n@@ -42615,7 +42616,7 @@ x86_output_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,\n Note that use_thunk calls assemble_start_function et al. */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n }\ndiff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c\nindex 79c323f..2a05293 100644\n--- a/gcc/config/ia64/ia64.c\n+++ b/gcc/config/ia64/ia64.c\n@@ -10944,7 +10944,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,\n emit_all_insn_group_barriers (NULL);\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c\nindex 8972665..3b656c7 100644\n--- a/gcc/config/m68k/m68k.c\n+++ b/gcc/config/m68k/m68k.c\n@@ -5131,7 +5131,7 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,\n /* Run just enough of rest_of_compilation. */\n insn = get_insns ();\n split_all_insns_noflow ();\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c\nindex 2cdd240..9f862292 100644\n--- a/gcc/config/microblaze/microblaze.c\n+++ b/gcc/config/microblaze/microblaze.c\n@@ -3233,7 +3233,7 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n \"borrowed\" from rs6000.c. */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c\nindex d2737a6..7dcc835 100644\n--- a/gcc/config/mips/mips.c\n+++ b/gcc/config/mips/mips.c\n@@ -19353,7 +19353,7 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n split_all_insns_noflow ();\n mips16_lay_out_constants (true);\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/nds32/nds32.c b/gcc/config/nds32/nds32.c\nindex 14310de..478824f 100644\n--- a/gcc/config/nds32/nds32.c\n+++ b/gcc/config/nds32/nds32.c\n@@ -1635,7 +1635,8 @@ nds32_asm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,\n int this_regno;\n \n /* Make sure unwind info is emitted for the thunk if needed. */\n- final_start_function (emit_barrier (), file, 1);\n+ rtx_insn *first = emit_barrier ();\n+ final_start_function (&first, file, 1);\n \n this_regno = (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function)\n \t\t? 1\ndiff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c\nindex 884b1dc..89600ee 100644\n--- a/gcc/config/nios2/nios2.c\n+++ b/gcc/config/nios2/nios2.c\n@@ -4060,7 +4060,7 @@ nios2_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n assemble_start_function and assemble_end_function. */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c\nindex 52f76cf..fd28213 100644\n--- a/gcc/config/pa/pa.c\n+++ b/gcc/config/pa/pa.c\n@@ -8379,7 +8379,8 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,\n xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);\n xoperands[2] = GEN_INT (delta);\n \n- final_start_function (emit_barrier (), file, 1);\n+ rtx_insn *first = emit_barrier ();\n+ final_start_function (&first, file, 1);\n \n /* Output the thunk. We know that the function is in the same\n translation unit (i.e., the same space) as the thunk, and that\ndiff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c\nindex f9aa13b..298f07a 100644\n--- a/gcc/config/rs6000/rs6000.c\n+++ b/gcc/config/rs6000/rs6000.c\n@@ -29292,7 +29292,7 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n assemble_start_function and assemble_end_function. */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \n@@ -37758,7 +37758,8 @@ rs6000_code_end (void)\n init_function_start (decl);\n first_function_block_is_cold = false;\n /* Make sure unwind info is emitted for the thunk if needed. */\n- final_start_function (emit_barrier (), asm_out_file, 1);\n+ rtx_insn *first = emit_barrier ();\n+ final_start_function (&first, asm_out_file, 1);\n \n fputs (\"\\tblr\\n\", asm_out_file);\n \ndiff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c\nindex deced95..ce98673 100644\n--- a/gcc/config/s390/s390.c\n+++ b/gcc/config/s390/s390.c\n@@ -12872,7 +12872,8 @@ s390_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,\n int nonlocal = 0;\n \n /* Make sure unwind info is emitted for the thunk if needed. */\n- final_start_function (emit_barrier (), file, 1);\n+ rtx_insn *first = emit_barrier ();\n+ final_start_function (&first, file, 1);\n \n /* Operand 0 is the target function. */\n op[0] = XEXP (DECL_RTL (function), 0);\ndiff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c\nindex c31776f..875d931 100644\n--- a/gcc/config/sh/sh.c\n+++ b/gcc/config/sh/sh.c\n@@ -10891,7 +10891,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n \n sh_reorg ();\n shorten_branches (insns);\n- final_start_function (insns, file, 1);\n+ final_start_function (&insns, file, 1);\n final (insns, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c\nindex d494ecf2..5d92080 100644\n--- a/gcc/config/sparc/sparc.c\n+++ b/gcc/config/sparc/sparc.c\n@@ -12074,7 +12074,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n assemble_start_function and assemble_end_function. */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c\nindex b6d03d7..e005077 100644\n--- a/gcc/config/spu/spu.c\n+++ b/gcc/config/spu/spu.c\n@@ -7020,7 +7020,8 @@ spu_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,\n rtx op[8];\n \n /* Make sure unwind info is emitted for the thunk if needed. */\n- final_start_function (emit_barrier (), file, 1);\n+ rtx_insn *insn = emit_barrier ();\n+ final_start_function (&insn, file, 1);\n \n /* Operand 0 is the target function. */\n op[0] = XEXP (DECL_RTL (function), 0);\ndiff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c\nindex 81559ac..ac4a5ff 100644\n--- a/gcc/config/tilegx/tilegx.c\n+++ b/gcc/config/tilegx/tilegx.c\n@@ -4998,7 +4998,7 @@ tilegx_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c\nindex f03f067..34b68b8 100644\n--- a/gcc/config/tilepro/tilepro.c\n+++ b/gcc/config/tilepro/tilepro.c\n@@ -4421,7 +4421,7 @@ tilepro_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,\n */\n insn = get_insns ();\n shorten_branches (insn);\n- final_start_function (insn, file, 1);\n+ final_start_function (&insn, file, 1);\n final (insn, file, 1);\n final_end_function ();\n \ndiff --git a/gcc/final.c b/gcc/final.c\nindex 401cfb6..15a301b 100644\n--- a/gcc/final.c\n+++ b/gcc/final.c\n@@ -1770,9 +1770,11 @@ get_some_local_dynamic_name ()\n test and compare insns. */\n \n void\n-final_start_function (rtx_insn *first, FILE *file,\n+final_start_function (rtx_insn **firstp, FILE *file,\n \t\t int optimize_p ATTRIBUTE_UNUSED)\n {\n+ rtx_insn *first = *firstp;\n+\n block_depth = 0;\n \n this_is_asm_operands = 0;\n@@ -4544,8 +4546,9 @@ rest_of_handle_final (void)\n variable_tracking_main ();\n \n assemble_start_function (current_function_decl, fnname);\n- final_start_function (get_insns (), asm_out_file, optimize);\n- final (get_insns (), asm_out_file, optimize);\n+ rtx_insn *first = get_insns ();\n+ final_start_function (&first, asm_out_file, optimize);\n+ final (first, asm_out_file, optimize);\n if (flag_ipa_ra\n && !lookup_attribute (\"noipa\", DECL_ATTRIBUTES (current_function_decl)))\n collect_fn_hard_reg_usage ();\ndiff --git a/gcc/output.h b/gcc/output.h\nindex 7a93fa8..278315f 100644\n--- a/gcc/output.h\n+++ b/gcc/output.h\n@@ -59,7 +59,7 @@ const char *get_some_local_dynamic_name ();\n for the new function. The label for the function and associated\n assembler pseudo-ops have already been output in\n `assemble_start_function'. */\n-extern void final_start_function (rtx_insn *, FILE *, int);\n+extern void final_start_function (rtx_insn **, FILE *, int);\n \n /* Output assembler code for the end of a function.\n For clarity, args are same as those of `final_start_function'\n", "prefixes": [ "6/9", "LVU" ] }