From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29056 invoked by alias); 19 Jan 2004 20:02:01 -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 29034 invoked from network); 19 Jan 2004 20:02:00 -0000 Received: from unknown (HELO frothingslosh.sfbay.redhat.com) (66.187.237.200) by sources.redhat.com with SMTP; 19 Jan 2004 20:02:00 -0000 Received: from frothingslosh.sfbay.redhat.com (localhost.localdomain [127.0.0.1]) by frothingslosh.sfbay.redhat.com (8.12.8/8.12.8) with ESMTP id i0JK20OG020625; Mon, 19 Jan 2004 12:02:00 -0800 Received: (from rth@localhost) by frothingslosh.sfbay.redhat.com (8.12.8/8.12.8/Submit) id i0JK207X020623; Mon, 19 Jan 2004 12:02:00 -0800 X-Authentication-Warning: frothingslosh.sfbay.redhat.com: rth set sender to rth@redhat.com using -f Date: Mon, 19 Jan 2004 20:02:00 -0000 From: Richard Henderson To: Richard Guenther Cc: Richard Kenner , ian@wasabisystems.com, gcc@gcc.gnu.org Subject: Re: Can we speed up the gcc_target structure? Message-ID: <20040119200200.GB20347@redhat.com> Mail-Followup-To: Richard Henderson , Richard Guenther , Richard Kenner , ian@wasabisystems.com, gcc@gcc.gnu.org References: <10401191153.AA27414@vlsi1.ultra.nyu.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-SW-Source: 2004-01/txt/msg01365.txt.bz2 On Mon, Jan 19, 2004 at 01:01:54PM +0100, Richard Guenther wrote: > 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 > } If we were going to do something like this, we shouldn't bother with the vector, we should just make the calls direct. There's a not insignificant cost to indirect vs direct calls. r~