This is the mail archive of the gcc-patches@gcc.gnu.org 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: Calls to built-in functions are not Binary Compatible


Andrew Haley wrote:
Bryce McKinlay writes:
> Doesn't this disable builtins mechanism entirely when > -findirect-dispatch is used?


Yes.

> These builtins improve GCJ's performance significantly on some numeric > code (scimark, for example).

So you don't use indirect dispatch, surely.
To not use indirect dispatch would make the benchmark rather artificial - since most of the code we're running on libgcj these days uses the BC ABI.
 > Wouldn't it be better to fix whatever problem is causing direct
 > calls to be generated rather than disabling them completely?

I don't understand your point -- this is the code that is causing
direct calls to be made. Built-in functions in gcc either generate
direct calls or they get replaced by inline code.

Surely it is a bug, rather than a feature of this code, that it is causing direct (non-BC) calls to Java functions to be made. Direct calls to gcc/libc internal functions or inlining code is another matter.


You could argue that it is not strictly "binary compatible" to inline, say, Math.min() - but realistically, the Math.* functions are well enough defined that they can always be safely inlined or converted to direct OS calls - since they are pure functions, that read only their arguments and do not depend on object layout and such.

Bryce


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