This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: how to enable vector intrinsic functions in fortran frontend
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: Sa Liu <SALIU at de dot ibm dot com>
- Cc: fortran at gcc dot gnu dot org, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
- Date: Mon, 15 Oct 2007 20:22:07 +0200
- Subject: Re: how to enable vector intrinsic functions in fortran frontend
- References: <OF36E54D77.18EA7822-ONC1257375.005EAA70-C1257375.006317E6@de.ibm.com>
Hello,
Sa Liu wrote:
Since PowerPC Vector type can be composed of different scalar types, some
of which, like pixel type doesn't exist in Fortran. XLF defines pixel type
in compiler frontend, but restricts its usage only as part of a vector
type. Our proposal is to have a facility in Fortran frontend to add
backend-specific data types, and construct vector and it's special scalar
types/kinds in PowerPC/SPU backend. Does this sound reasonable?
The C frontend family went to great lengths to ensure that the vector
stuff works reasonably well across platforms, so it might be worth
looking there for inspiration. I didn't find any mention of pixel in
gcc's documentation, so they may have decided against it (which would
also mean that you would have to implement the backend support for this).
As to the intrinsic functions, the target specific builtin functions (e.g.
__builtin_altivec_...) have been initialized in
gfc_init_builtin_functions. The question is how could these functions be
mapped to Fortran frontend, with names recognizable by the fortran
program?
I think an intrinsic module would be the best place for these to go.
Best regards, and looking forward to your contribution,
- Tobi