This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: how to enable vector intrinsic functions in fortran frontend



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


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