From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19427 invoked by alias); 30 Jul 2003 15:29:51 -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 19391 invoked from network); 30 Jul 2003 15:29:49 -0000 Received: from unknown (HELO ams004.ftl.affinity.com) (216.219.253.199) by sources.redhat.com with SMTP; 30 Jul 2003 15:29:49 -0000 Received: from coyotegulch.com ([68.200.44.160]) by ams.ftl.affinity.com with ESMTP id <216967-21321>; Wed, 30 Jul 2003 11:28:31 -0400 Message-ID: <3F27E41C.7080505@coyotegulch.com> Date: Wed, 30 Jul 2003 15:50:00 -0000 From: Scott Robert Ladd User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2 X-Accept-Language: en MIME-Version: 1.0 To: Alexandre Oliva CC: Gabriel Dos Reis , Steven Bosscher , Richard Guenther , gcc@gcc.gnu.org Subject: Re: std::pow implementation References: <1059481647.3651.120.camel@steven.lr-s.tudelft.nl> <1059483328.3651.144.camel@steven.lr-s.tudelft.nl> <1059487859.3650.208.camel@steven.lr-s.tudelft.nl> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg02198.txt.bz2 Alexandre Oliva wrote: > Therefore, inline the way you describe it, is useful only for > functions that are *always* profitable to inline. Any function that > might or might not be profitable to inline should not be declared > inline, and the compiler would never inline it. This sounds silly to > me. Why not let the user tell the compiler `hey, look, this > function is probably worth trying to inline', but letting the > compiler decide whether it's actually profitable or not, depending > not only on the context, but also on machine-dependent features? IMNSHO, the keyword "inline" means precisely what it says: to inline the code for a given function, if possible. You are applying a different semantic concept to "inline" -- you want a keyword that says "make this function as efficient as possible when used". As such, it would be better to have a new keyword -- say "optimize" -- that identifies a function important to performance, explicitly handing decisions to the compiler. "Inline", however, has a very precise and direct meaning, and it should be fuddled with imprecise expectations. -- Scott Robert Ladd Coyote Gulch Productions (http://www.coyotegulch.com) Software Invention for High-Performance Computing