From patchwork Mon Oct 20 14:32:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 401165 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B329C140081 for ; Tue, 21 Oct 2014 01:34:01 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=rzzydx5X+fkyvzcSi XJ31EcqCQggOU4pWhemp/mcDO+cOQZEfmH7pkBBF62Tcx85E2nPP6k8oWS4X+NR/ T5BpuPEkJJk5HHNGUM3HJD2M67eTp/EK2/gAX4U7r6+SBConFW4LpWCyG2GuW5Es 4gxf4mCR0UmsHo3PYqUFF+hAiU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=aa26aIdl8Ksnac3K5oo6HF6 GbCM=; b=pGn47wMuIdAnWtT4IjPaMFlpOFMpPUlatKt2DRxASsazMQRHsC53Ii1 qEKiBJQMi2P7dmlrGteZ/nziaYCan/lG1htM4gbZmXXZgQKhyv1J9O8Gxc+mz5QZ JRF4rFxMubY40sXNspfLRU0YC30i3zVRjX8LLwGGnhSGQQ6uq8tc= Received: (qmail 9369 invoked by alias); 20 Oct 2014 14:33:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 9359 invoked by uid 89); 20 Oct 2014 14:33:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, T_FROM_12LTRDOM autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Oct 2014 14:33:53 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XgE1u-0005Br-8i from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Mon, 20 Oct 2014 07:33:50 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.181.6; Mon, 20 Oct 2014 15:33:48 +0100 Message-ID: <54451D03.2000909@codesourcery.com> Date: Mon, 20 Oct 2014 16:32:35 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: GCC Patches Subject: The nvptx port [9/11+] Epilogues References: <54451994.9070209@codesourcery.com> In-Reply-To: <54451994.9070209@codesourcery.com> We skip the late compilation passes on ptx, but there's one piece we do need - fixing up the function so that we get return insns in the right places. This patch just makes thread_prologue_and_epilogue_insns callable from the reorg pass. Bernd gcc/ * function.c (thread_prologue_and_epilogue_insns): No longer static. * function.h (thread_prologue_and_epilogue_insns): Declare. ------------------------------------------------------------------------ Index: gcc/function.c =================================================================== --- gcc/function.c (revision 422424) +++ gcc/function.c (revision 422425) @@ -5945,7 +5945,7 @@ emit_return_for_exit (edge exit_fallthru in a sibcall omit the sibcall_epilogue if the block is not in ANTIC. */ -static void +void thread_prologue_and_epilogue_insns (void) { bool inserted; Index: gcc/function.h =================================================================== --- gcc/function.h (revision 422424) +++ gcc/function.h (revision 422425) @@ -773,6 +773,8 @@ extern void free_after_compilation (stru extern void init_varasm_status (void); +extern void thread_prologue_and_epilogue_insns (void); + #ifdef RTX_CODE extern void diddle_return_value (void (*)(rtx, void*), void*); extern void clobber_return_register (void);