From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18873 invoked by alias); 14 Feb 2011 17:47:53 -0000 Received: (qmail 18863 invoked by uid 22791); 14 Feb 2011 17:47:52 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 17:47:48 +0000 Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id p1EHljc0010669 for ; Mon, 14 Feb 2011 09:47:45 -0800 Received: from iwc10 (iwc10.prod.google.com [10.241.65.138]) by wpaz17.hot.corp.google.com with ESMTP id p1EHl1Qs009651 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 14 Feb 2011 09:47:43 -0800 Received: by iwc10 with SMTP id 10so5158846iwc.14 for ; Mon, 14 Feb 2011 09:47:43 -0800 (PST) Received: by 10.42.167.71 with SMTP id r7mr5453086icy.220.1297705663351; Mon, 14 Feb 2011 09:47:43 -0800 (PST) Received: from coign.google.com ([216.239.45.130]) by mx.google.com with ESMTPS id d13sm2531592ice.16.2011.02.14.09.47.41 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Feb 2011 09:47:42 -0800 (PST) From: Ian Lance Taylor 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> Date: Mon, 14 Feb 2011 17:48:00 -0000 In-Reply-To: <64888.39441.qm@web28511.mail.ukl.yahoo.com> (charfi asma's message of "Mon, 14 Feb 2011 16:43:40 +0000 (GMT)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true X-IsSubscribed: yes 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/msg00208.txt.bz2 charfi asma writes: > I am developping my own gcc front end. My source language contains concepts that > are not represented directly in C code. > to compile those elements, I think that I should add a new tree codes to my > front end as C++ does for templates... > I think that I should also implement how to translate this new tree code in > Gimple. > my question is : should I also care about how to translate those tree code al > over the compiler chain: gimple --> ssa --> unssa --> rtl --> ass ... > 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. First let me say that if your language is very different from C you probably shouldn't be using trees at all. But if your language is mostly like C then using trees is reasonable. Even the C frontend itself has language-specific tree codes; see c-family/c-common.def. Or look at Objective C, at objc/objc-tree.def. Ian