[clang] [Clang][AArch64] Add fix vector types to header into SVE (PR #73258)

Sander de Smalen via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 27 03:44:46 PST 2023


================
@@ -2546,6 +2548,44 @@ void NeonEmitter::runFP16(raw_ostream &OS) {
   OS << "#endif /* __ARM_FP16_H */\n";
 }
 
+void NeonEmitter::runVectorType(raw_ostream &OS) {
+  OS << "/*===---- arm_vector_type - ARM vector type "
+        "------===\n"
+        " *\n"
+        " *\n"
+        " * Part of the LLVM Project, under the Apache License v2.0 with LLVM "
+        "Exceptions.\n"
+        " * See https://llvm.org/LICENSE.txt for license information.\n"
+        " * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception\n"
+        " *\n"
+        " *===-----------------------------------------------------------------"
+        "------===\n"
+        " */\n\n";
+  OS << "#ifndef __ARM_NEON_TYPES_H\n";
+  OS << "#define __ARM_NEON_TYPES_H\n";
+  OS << "#ifdef __cplusplus\n";
+  OS << "extern \"C\" {\n";
+  OS << "#endif\n";
+  OS << "#ifndef __ARM_NEON_H\n";
+
+  std::string TypedefTypes("QcQsQiQlQUcQUsQUiQUlQhQfQdQb");
----------------
sdesmalen-arm wrote:

This only emits the 128-bit vector types which are needed arm_sve.h, but not the others. The name `arm_vector_type.h` suggests this contains all vector types. Maybe you can rename the header file to `arm_neon_sve_compatible_vector_types.h` or something?

https://github.com/llvm/llvm-project/pull/73258


More information about the cfe-commits mailing list