From patchwork Wed Apr 23 13:08:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 341839 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 4782014011C for ; Wed, 23 Apr 2014 23:08:59 +1000 (EST) 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:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=l7yxQgCm96DNI/GXH JyzdLJpjtXpI8TyAFLfTNXjVNtyAW1gdImzts3lRnXf2HatFre1ty0kgHjjQbW1Q rIp5LGKtwATM9Z/P0/LJrzCQNOY7Y6tOAmgcexysOi6RfBVCjA77UMeRm1XSjyao RkeXViyfUlpSFbvxMEYh7llrnY= 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:cc:subject:references :in-reply-to:content-type; s=default; bh=oBd10vC3xQyIWqpwqi/RYln sO/k=; b=pQ7/oJSD3pNJbnvBXxloYehQNm13Vpo2giVoJYHop7NZno9Zco3+IK8 vGpzTNnJ/z5sd7OsgRloy+US01T4PWRyN/MGmGbSU+rxWdZ6EaSAQ6RcD1ccyZZt AodYZ3vR6gdVQ6LVe7n4Vgf957FnxoT1esio16weqOIbG8iYsh/g= Received: (qmail 18746 invoked by alias); 23 Apr 2014 13:08:51 -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 18736 invoked by uid 89); 23 Apr 2014 13:08:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00 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; Wed, 23 Apr 2014 13:08:48 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Wcwuq-0002pS-Kl from Tom_deVries@mentor.com ; Wed, 23 Apr 2014 06:08:44 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 23 Apr 2014 06:08:44 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Wed, 23 Apr 2014 14:08:41 +0100 Message-ID: <5357BB57.1090506@mentor.com> Date: Wed, 23 Apr 2014 15:08:39 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: Eric Botcazou CC: , "gcc-patches@gcc.gnu.org" , Richard Earnshaw Subject: Add post_expand_call_insn hook References: <534ED7BC.50300@mentor.com> <534FF0F9.60404@redhat.com> <87lhv4ug7f.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> <53500628.2090802@redhat.com> <5356853D.8050905@mentor.com> In-Reply-To: <5356853D.8050905@mentor.com> On 22-04-14 17:05, Tom de Vries wrote: > I've updated the fuse-caller-save patch series to model non-callee call clobbers > in CALL_INSN_FUNCTION_USAGE. Eric, this patch adds a post_expand_call_insn hook. The hook is called right after expansion of calls, and allows a target to do additional processing, such as f.i. adding clobbers to CALL_INSN_FUNCTION_USAGE. Instead of using the hook, we could add code to the preparation statements operand of the different call expands, but that requires those expands not to use the rtl template, and generate all the rtl through c code. Which requires a rewrite of the call expands in case of Aarch64. Bootstrapped and reg-tested on x86_64 as part of the fuse-caller-save patch series. OK for trunk? Thanks, - Tom 2014-04-18 Tom de Vries