[java] RFA: builtins vs. -findirect-dispatch
Andrew Haley
aph@redhat.com
Thu Jul 13 09:07:00 GMT 2006
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.
Andrew.
More information about the Java-patches
mailing list