From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20786 invoked by alias); 14 Feb 2011 17:48:43 -0000 Received: (qmail 20762 invoked by uid 22791); 14 Feb 2011 17:48:42 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from wp154.webpack.hosteurope.de (HELO wp154.webpack.hosteurope.de) (80.237.132.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 17:48:36 +0000 Received: from cor000cs01.americas.hp.net ([15.251.169.69]); authenticated by wp154.webpack.hosteurope.de running ExIM with esmtpa id 1Pp2XH-0000Bv-51; Mon, 14 Feb 2011 18:48:32 +0100 Message-ID: <4D596AEA.7030705@andihellmund.com> Date: Mon, 14 Feb 2011 23:59:00 -0000 From: Andi Hellmund User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.11pre) Gecko/20100624 Spicebird/0.8 MIME-Version: 1.0 To: charfi asma CC: gcc-help@gcc.gnu.org Subject: Re: [GCC front end] add new TREE CODE References: <64888.39441.qm@web28511.mail.ukl.yahoo.com> In-Reply-To: <64888.39441.qm@web28511.mail.ukl.yahoo.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00209.txt.bz2 Hey Asma, > my question is : should I also care about how to translate those tree code al > over the compiler chain: gimple --> ssa --> unssa --> rtl --> ass ... > The idea of GCC's modularization is that a front-end should maximally care about GIMPLE. All the other transformations are done by the middle-end. > did you suggest to follow an example of an existing front end that adds some > tree code cause the C++ one seems to be mature and complete. > Yes, the C++ front-end uses quite a lot of own TREE codes, but I would then start with a very simple one and check how it "translates" the TREE codes into a GIMPLE sequence, e.g. by looking at the 'gimplify_expr' language hook which is 'cp_gimplify_expr' for C++. I hope that helps. If you have any further question about the specific transformation from TREE codes to GIMPLE, just let us know ... Andi