This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [java] RFA: builtins vs. -findirect-dispatch

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]