how to enable vector intrinsic functions in fortran frontend

Tobias Schlüter tobias.schlueter@physik.uni-muenchen.de
Mon Oct 15 18:22:00 GMT 2007


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



More information about the Fortran mailing list