altivec predicates
Daniel Berlin
dan@dberlin.org
Fri Feb 1 22:56:00 GMT 2002
On Fri, 1 Feb 2002, David Edelsohn wrote:
> >>>>> Daniel Berlin writes:
>
> Daniel> Because they have to have a type when declared to the frontend, and the
> Daniel> type gets checked before we get a chance at the function.
>
> What is "they"?
The builtin functions.
> You mean the builtin needs to be prototyped so
> that the arguments match the builtin?
Yes.
For the most part, as far as the front end is concerned, all
the builtins are is the resulting tree nodes you would get from processing a header
file containing the same declarations (Their are a few niggling little
differences, like the fact that they have the DECL_BUILTIN set to true,
etc)
However, when it comes time to expand the function to rtl, it
sees the DECL_BUILTIN, and calls expand_builtin, which in turn will call
the MD function if thats where it's defined.
So, by the time we get to expand it, it's way too late to determine the
modes of the arguments automatically.
>
> Daniel> Remember, C has no overloading, so we can't declare multiple
> Daniel> builtin_altivec_predicate functions, for all possible sets of types.
>
> I wasn't implying overloading.
Yeah, but it's usually what people come up with next when trying to
find solutions to this problem :) (Since of course, it *would* work).
> David
>
More information about the Gcc-patches
mailing list