This revision is a followup to Support for PowerPC vector type. The current solution internally represents PowerPC vector types as derived-types. A new builtin module, named __fortran_ppc_types has been added to declare the corresponding derived-types.
The idea of using derived-types was suggested by Jean Perier and Peter Klausler.
Contributors:
Coauthor: Daniel Chen (IBM)
Co-designers: Daniel Chen (IBM), Kelvin Li (IBM)
For convenience, the summary from the original review is added below.
This RFC is for adding the PowerPC vector type support as a language extension.
It has the following syntax:
VECTOR(element-type-spec)where
element-type-specis:
integer-type-specor
real-type-specor
unsigned-type-specA finite set of functionalities are implemented in order to support the PowerPC vector type:
- declare VECTOR type objects.
- declare VECTOR type function result.
- declare VECTOR type dummy arguments.
- intrinsic assignment between VECTOR type objects. (e.g. v1 = v2)
- reference VECTOR functions.
This patch only supports the functionalities mentioned at the above. Others, such as intrinsic operators are not extended to support vectors as all operations on vector types (such as addition, subtraction, construction, ... etc) are done via calls to vector intrinsic functions. The support of constant expressions, derived component, POINTER or ALLOCATABLE attribute, I/O, and etc is not included in this patch.
The purpose of this RFC is to get comments from the community on our implementation approach. We plan to add the LIT tests in this patch as a revision soon. We also plan to add semantic checking in a separate patch in the near future.
Can you please use a more specific name, like PPCVector? Thanks