From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27119 invoked by alias); 23 Dec 2009 15:13:02 -0000 Received: (qmail 27109 invoked by uid 22791); 23 Dec 2009 15:13:01 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Dec 2009 15:12:58 +0000 Received: from unknown (HELO epsilon2) ([192.168.1.60]) by c60.cesmail.net with ESMTP; 23 Dec 2009 10:12:57 -0500 Received: from 78.147.107.58 ([78.147.107.58]) by webmail.spamcop.net (Horde MIME library) with HTTP; Wed, 23 Dec 2009 10:12:56 -0500 Message-ID: <20091223101256.z6a8ug32o8k84o4o-nzlynne@webmail.spamcop.net> Date: Wed, 23 Dec 2009 15:13:00 -0000 From: Joern Rennecke To: Grigori Fursin , 'GCC Mailing List' , ctuning-discussions@googlegroups.com Cc: 'Yuanjie Huang' , 'Liang Peng' , 'Zbigniew Chamski' , 'Yuri Kashnikoff' , 'Diego Novillo' Subject: target hooks / plugins References: <4AE6E471.4020200@starynkevitch.net> <4AE70C5E.4050005@starynkevitch.net> <84fc9c000910270839v2d9efe0dw829c8647f361c96f@mail.gmail.com> <4AE7164D.9010200@starynkevitch.net> <84fc9c000910270855w736df367qe511d8db280aaeb4@mail.gmail.com> <2dc303d60910271056h17038110ib63c53cfa374f5c7@mail.gmail.com> <20091102074959.p8410ulv28sg0w44-nzlynne@webmail.spamcop.net> <20091105082557.75c2estyoog8ss0c-nzlynne@webmail.spamcop.net> <-2186575642631489790@unknownmsgid> <55692dc10911050634y54a5fea7jd2ba773086cda60b@mail.gmail.com> <00d801ca5e34$e5384160$afa8c420$@fursin@inria.fr> In-Reply-To: <00d801ca5e34$e5384160$afa8c420$@fursin@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-12/txt/msg00338.txt.bz2 Target hooks would often be interesting for plugins to modify. And some proposed new plugin callbacks would also be interesting to have as target hooks. Therefore, I would like target hooks to become writeable by plugins, and make it much easier to add new target hooks in the GCC sources. Right now, to make a new target hook, you have to add a new field in target.h, define a new default in target-def.h, place the new macro in exactly the right position there of the right initializer macro, describe the new hook in tm.texi, and if you need a new function with a bunch of parameters returning a constant, you have to add this to hooks.c . I would like to be able to do all this by adding a single entry in a new definition file; and the information should also be usable by plugin sources so that they can automatically make wrappers for all function-type hooks. Most of the ICI unroll_parameter_handler / graphite_parameter_handler callbacks can the be made into target hooks.