This is the mail archive of the
mailing list for the GCC project.
Re: [java] RFA: builtins vs. -findirect-dispatch
- From: Andrew Haley <aph at redhat dot com>
- To: Bryce McKinlay <mckinlay at redhat dot com>
- Cc: Java Patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 13 Jul 2006 10:07:39 +0100
- Subject: Re: [java] RFA: builtins vs. -findirect-dispatch
- References: <44B5CB9B.firstname.lastname@example.org>
Bryce McKinlay writes:
> Currently, some of GCJ's Math builtins can generate non-indirect
> function calls even when -findirect-dispatch is set. The simplest fix
> for this seems to be to simply disable builtins where a function call
> could be generated and -findirect-dispatch in use.
LOL! I remember suggesting this patch before and being told that it
was a bad idea as it would affect performance!
> This shouldn't really effect performance for the general case,
> since these builtins usually seem to generate function calls anyway
> unless -ffast-math is in use. Other builtins like Math.min(),
> which never use a function call, will still work.
> This is needed for the upcoming libgcj_bc patch, since that will ensure
> at link time that only known BC-ABI symbols are used by an
> -findirect-dispatch binary.
> OK to commit?
OK. It's not ideal, but I suppose it has the virtue of simplicity.
It would be better for calls such as Math.sin() to map directly to
sin(); the indirection does no good at all. But it's no big deal.