This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Can we speed up the gcc_target structure?
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: ian at wasabisystems dot com, gcc at gcc dot gnu dot org
- Date: Mon, 19 Jan 2004 13:01:54 +0100 (CET)
- Subject: Re: Can we speed up the gcc_target structure?
- References: <10401191153.AA27414@vlsi1.ultra.nyu.edu>
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 <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/