From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3419 invoked by alias); 19 Jan 2004 12:01:57 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 3409 invoked from network); 19 Jan 2004 12:01:55 -0000 Received: from unknown (HELO bellatrix.tat.physik.uni-tuebingen.de) (134.2.170.113) by sources.redhat.com with SMTP; 19 Jan 2004 12:01:55 -0000 Received: by bellatrix.tat.physik.uni-tuebingen.de (Postfix, from userid 30023) id 024C1FF4C; Mon, 19 Jan 2004 13:01:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by bellatrix.tat.physik.uni-tuebingen.de (Postfix) with ESMTP id F328F9442; Mon, 19 Jan 2004 13:01:54 +0100 (CET) Date: Mon, 19 Jan 2004 12:01:00 -0000 From: Richard Guenther To: Richard Kenner Cc: ian@wasabisystems.com, gcc@gcc.gnu.org Subject: Re: Can we speed up the gcc_target structure? In-Reply-To: <10401191153.AA27414@vlsi1.ultra.nyu.edu> Message-ID: References: <10401191153.AA27414@vlsi1.ultra.nyu.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2004-01/txt/msg01259.txt.bz2 On Mon, 19 Jan 2004, Richard Kenner wrote: > My sense would be to revert these changes and eliminate the target stucture > in favor of the simpler macro approach. > > Am I the only one who feels this way? If not, this may be an issue for the > SC to address. A better way would be to handle those target functions that can be const with a hybrid approach like #define TARGET_FUNCTION_FOO_CONST_VALUE false static inline bool target_function_foo(...) { #ifdef TARGET_FUNCTION_FOO_CONST_VALUE return TARGET_FUNCTION_FOO_CONST_VALUE; #else return vec->target_function_foo(...); #endif } and for sanity struct target_vector { ... #ifndef TARGET_FUNCTION_FOO_CONST_VALUE bool (*target_function_foo)(...); #endif ... }; or semantically similar approach. This way targets can decide, if they want a modifiable target vector, or if they have a more complex requirement. Richard. -- Richard Guenther WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/