Skip to content

Commit e27e014

Browse files
committed
Updates and cleanup.
1 parent 410d782 commit e27e014

40 files changed

+199
-195
lines changed

clang/include/clang/AST/ASTContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
12181218
#include "clang/Basic/OpenCLExtensionTypes.def"
12191219
#define SVE_TYPE(Name, Id, SingletonId) \
12201220
CanQualType SingletonId;
1221-
#include "clang/Basic/AArch64SVEACLETypes.def"
1221+
#include "clang/Basic/AArch64ACLETypes.def"
12221222
#define PPC_VECTOR_TYPE(Name, Id, Size) \
12231223
CanQualType Id##Ty;
12241224
#include "clang/Basic/PPCTypes.def"

clang/include/clang/AST/Type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3093,7 +3093,7 @@ class BuiltinType : public Type {
30933093
#include "clang/Basic/OpenCLExtensionTypes.def"
30943094
// SVE Types
30953095
#define SVE_TYPE(Name, Id, SingletonId) Id,
3096-
#include "clang/Basic/AArch64SVEACLETypes.def"
3096+
#include "clang/Basic/AArch64ACLETypes.def"
30973097
// PPC MMA Types
30983098
#define PPC_VECTOR_TYPE(Name, Id, Size) Id,
30993099
#include "clang/Basic/PPCTypes.def"

clang/include/clang/AST/TypeProperties.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ let Class = BuiltinType in {
863863

864864
#define SVE_TYPE(NAME, ID, SINGLETON_ID) \
865865
case BuiltinType::ID: return ctx.SINGLETON_ID;
866-
#include "clang/Basic/AArch64SVEACLETypes.def"
866+
#include "clang/Basic/AArch64ACLETypes.def"
867867

868868
#define PPC_VECTOR_TYPE(NAME, ID, SIZE) \
869869
case BuiltinType::ID: return ctx.ID##Ty;

clang/include/clang/Basic/AArch64SVEACLETypes.def renamed to clang/include/clang/Basic/AArch64ACLETypes.def

Lines changed: 48 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
//===-- AArch64SVEACLETypes.def - Metadata about SVE types ------*- C++ -*-===//
1+
//===-- AArch64ACLETypes.def - Metadata about SVE types ---------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88
//
9-
// This file defines various SVE builtin types. The macros are:
9+
// This file defines various Neon and SVE builtin types. The macros are:
10+
//
11+
// NEON_VECTOR_TYPE:
12+
// - (Name, BaseType, ElBits, NumEls, VectorKind)
13+
// Unlike the SVE types, the Neon vector types are not builtin types and
14+
// mapped to the equivalent __attribute__(neon_vector_type(...)) vector type.
15+
// They are not builtin types.
1016
//
1117
// SVE_TYPE:
1218
// - (Name, MangledName, Id, SingletonId)
@@ -57,6 +63,14 @@
5763
// - IsBF true for vector of brain float elements.
5864
//===----------------------------------------------------------------------===//
5965

66+
#ifndef NEON_VECTOR_TYPE
67+
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind)
68+
#endif
69+
70+
#ifndef SVE_TYPE
71+
#define SVE_TYPE(Name, Id, SingletonId)
72+
#endif
73+
6074
#ifndef SVE_SCALAR_TYPE
6175
#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits) \
6276
SVE_TYPE(Name, Id, SingletonId)
@@ -107,7 +121,38 @@
107121
SVE_TYPE(Name, Id, SingletonId)
108122
#endif
109123

110-
//===- Vector point types -----------------------------------------------===//
124+
//===- Neon Vector point types --------------------------------------------===//
125+
126+
NEON_VECTOR_TYPE(__Int8x8_t, CharTy, 8, 8, VectorKind::Neon)
127+
NEON_VECTOR_TYPE(__Int16x4_t, ShortTy, 16, 4, VectorKind::Neon)
128+
NEON_VECTOR_TYPE(__Int32x2_t, IntTy, 32, 2, VectorKind::Neon)
129+
NEON_VECTOR_TYPE(__Uint8x8_t, CharTy, 8, 8, VectorKind::Neon)
130+
NEON_VECTOR_TYPE(__Uint16x4_t, UnsignedShortTy, 16, 4, VectorKind::Neon)
131+
NEON_VECTOR_TYPE(__Uint32x2_t, UnsignedIntTy, 32, 2, VectorKind::Neon)
132+
NEON_VECTOR_TYPE(__Float16x4_t, Float16Ty, 16, 4, VectorKind::Neon)
133+
NEON_VECTOR_TYPE(__Float32x2_t, FloatTy, 32, 2, VectorKind::Neon)
134+
NEON_VECTOR_TYPE(__Poly8x8_t, CharTy, 8, 8, VectorKind::NeonPoly)
135+
NEON_VECTOR_TYPE(__Poly16x4_t, UnsignedShortTy, 16, 4, VectorKind::NeonPoly)
136+
NEON_VECTOR_TYPE(__Bfloat16x4_t, BFloat16Ty, 16, 4, VectorKind::Neon)
137+
NEON_VECTOR_TYPE(__Int8x16_t, CharTy, 8, 16, VectorKind::Neon)
138+
NEON_VECTOR_TYPE(__Int16x8_t, ShortTy, 16, 8, VectorKind::Neon)
139+
NEON_VECTOR_TYPE(__Int32x4_t, IntTy, 32, 4, VectorKind::Neon)
140+
NEON_VECTOR_TYPE(__Int64x2_t, LongLongTy, 64, 2, VectorKind::Neon)
141+
NEON_VECTOR_TYPE(__Uint8x16_t, CharTy, 8, 16, VectorKind::Neon)
142+
NEON_VECTOR_TYPE(__Uint16x8_t, UnsignedShortTy, 16, 8, VectorKind::Neon)
143+
NEON_VECTOR_TYPE(__Uint32x4_t, UnsignedIntTy, 32, 4, VectorKind::Neon)
144+
NEON_VECTOR_TYPE(__Uint64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::Neon)
145+
NEON_VECTOR_TYPE(__Float16x8_t, Float16Ty, 16, 8, VectorKind::Neon)
146+
NEON_VECTOR_TYPE(__Float32x4_t, FloatTy, 32, 4, VectorKind::Neon)
147+
NEON_VECTOR_TYPE(__Float64x2_t, DoubleTy, 64, 2, VectorKind::Neon)
148+
NEON_VECTOR_TYPE(__Poly8x16_t, CharTy, 8, 16, VectorKind::NeonPoly)
149+
NEON_VECTOR_TYPE(__Poly16x8_t, UnsignedShortTy, 16, 8, VectorKind::NeonPoly)
150+
NEON_VECTOR_TYPE(__Poly64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::NeonPoly)
151+
NEON_VECTOR_TYPE(__Bfloat16x8_t, BFloat16Ty, 16, 8, VectorKind::Neon)
152+
NEON_VECTOR_TYPE(__Mfloat8x8_t, MFloat8Ty, 8, 8, VectorKind::Neon)
153+
NEON_VECTOR_TYPE(__Mfloat8x16_t, MFloat8Ty, 8, 16, VectorKind::Neon)
154+
155+
//===- SVE Vector point types ---------------------------------------------===//
111156

112157
SVE_VECTOR_TYPE_INT(__SVInt8_t, __SVInt8_t, SveInt8, SveInt8Ty, 16, 8, 1, true)
113158
SVE_VECTOR_TYPE_INT(__SVInt16_t, __SVInt16_t, SveInt16, SveInt16Ty, 8, 16, 1, true)
@@ -201,41 +246,6 @@ SVE_OPAQUE_TYPE(__SVCount_t, __SVCount_t, SveCount, SveCountTy)
201246

202247
SVE_SCALAR_TYPE(__mfp8, __mfp8, MFloat8, MFloat8Ty, 8)
203248

204-
// Unlike the SVE types above, the Neon vector types are parsed as keywords and
205-
// mapped to the equivalent __attribute__(neon_vector_type(...)) vector type.
206-
// They are not builtin types.
207-
#ifndef NEON_VECTOR_TYPE
208-
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind)
209-
#endif
210-
NEON_VECTOR_TYPE(__Int8x8_t, CharTy, 8, 8, VectorKind::Neon)
211-
NEON_VECTOR_TYPE(__Int16x4_t, ShortTy, 16, 4, VectorKind::Neon)
212-
NEON_VECTOR_TYPE(__Int32x2_t, IntTy, 32, 2, VectorKind::Neon)
213-
NEON_VECTOR_TYPE(__Uint8x8_t, CharTy, 8, 8, VectorKind::Neon)
214-
NEON_VECTOR_TYPE(__Uint16x4_t, UnsignedShortTy, 16, 4, VectorKind::Neon)
215-
NEON_VECTOR_TYPE(__Uint32x2_t, UnsignedIntTy, 32, 2, VectorKind::Neon)
216-
NEON_VECTOR_TYPE(__Float16x4_t, Float16Ty, 16, 4, VectorKind::Neon)
217-
NEON_VECTOR_TYPE(__Float32x2_t, FloatTy, 32, 2, VectorKind::Neon)
218-
NEON_VECTOR_TYPE(__Poly8x8_t, CharTy, 8, 8, VectorKind::NeonPoly)
219-
NEON_VECTOR_TYPE(__Poly16x4_t, UnsignedShortTy, 16, 4, VectorKind::NeonPoly)
220-
NEON_VECTOR_TYPE(__Bfloat16x4_t, BFloat16Ty, 16, 4, VectorKind::Neon)
221-
NEON_VECTOR_TYPE(__Int8x16_t, CharTy, 8, 16, VectorKind::Neon)
222-
NEON_VECTOR_TYPE(__Int16x8_t, ShortTy, 16, 8, VectorKind::Neon)
223-
NEON_VECTOR_TYPE(__Int32x4_t, IntTy, 32, 4, VectorKind::Neon)
224-
NEON_VECTOR_TYPE(__Int64x2_t, LongLongTy, 64, 2, VectorKind::Neon)
225-
NEON_VECTOR_TYPE(__Uint8x16_t, CharTy, 8, 16, VectorKind::Neon)
226-
NEON_VECTOR_TYPE(__Uint16x8_t, UnsignedShortTy, 16, 8, VectorKind::Neon)
227-
NEON_VECTOR_TYPE(__Uint32x4_t, UnsignedIntTy, 32, 4, VectorKind::Neon)
228-
NEON_VECTOR_TYPE(__Uint64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::Neon)
229-
NEON_VECTOR_TYPE(__Float16x8_t, Float16Ty, 16, 8, VectorKind::Neon)
230-
NEON_VECTOR_TYPE(__Float32x4_t, FloatTy, 32, 4, VectorKind::Neon)
231-
NEON_VECTOR_TYPE(__Float64x2_t, DoubleTy, 64, 2, VectorKind::Neon)
232-
NEON_VECTOR_TYPE(__Poly8x16_t, CharTy, 8, 16, VectorKind::NeonPoly)
233-
NEON_VECTOR_TYPE(__Poly16x8_t, UnsignedShortTy, 16, 8, VectorKind::NeonPoly)
234-
NEON_VECTOR_TYPE(__Poly64x2_t, UnsignedLongLongTy, 64, 2, VectorKind::NeonPoly)
235-
NEON_VECTOR_TYPE(__Bfloat16x8_t, BFloat16Ty, 16, 8, VectorKind::Neon)
236-
NEON_VECTOR_TYPE(__Mfloat8x8_t, MFloat8Ty, 8, 8, VectorKind::Neon)
237-
NEON_VECTOR_TYPE(__Mfloat8x16_t, MFloat8Ty, 16, 8, VectorKind::Neon)
238-
239249
#undef NEON_VECTOR_TYPE
240250
#undef SVE_VECTOR_TYPE
241251
#undef SVE_VECTOR_TYPE_MFLOAT

clang/include/clang/Basic/LangOptions.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,6 @@ COMPATIBLE_VALUE_LANGOPT(FunctionAlignment, 5, 0, "Default alignment for functio
463463
COMPATIBLE_VALUE_LANGOPT(LoopAlignment, 32, 0, "Default alignment for loops")
464464

465465
LANGOPT(FixedPoint, 1, 0, "fixed point types")
466-
LANGOPT(ACLE, 1, 0, "Arm C Language Extensions")
467466
LANGOPT(PaddingOnUnsignedFixedPoint, 1, 0,
468467
"unsigned fixed point types having one extra padding bit")
469468

clang/include/clang/Basic/Specifiers.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@ namespace clang {
9898
#define GENERIC_IMAGE_TYPE(ImgType, Id) \
9999
TST_##ImgType##_t, // OpenCL image types
100100
#include "clang/Basic/OpenCLImageTypes.def"
101-
102-
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
103-
TST_##Name,
104-
#define SVE_TYPE(Name, Id, SingletonId)
105-
#include "clang/Basic/AArch64SVEACLETypes.def"
106-
107101
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
108102
TST_##Name, // HLSL Intangible Types
109103
#include "clang/Basic/HLSLIntangibleTypes.def"

clang/include/clang/Basic/TargetInfo.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ class TargetInfo : public TransferrableTargetInfo,
270270
unsigned HasBuiltinMSVaList : 1;
271271

272272
LLVM_PREFERRED_TYPE(bool)
273-
unsigned HasAArch64SVETypes : 1;
273+
unsigned HasAArch64ACLETypes : 1;
274274

275275
LLVM_PREFERRED_TYPE(bool)
276276
unsigned HasRISCVVTypes : 1;
@@ -1055,9 +1055,9 @@ class TargetInfo : public TransferrableTargetInfo,
10551055
/// available on this target.
10561056
bool hasBuiltinMSVaList() const { return HasBuiltinMSVaList; }
10571057

1058-
/// Returns whether or not the AArch64 SVE built-in types are
1058+
/// Returns whether or not the AArch64 ACLE built-in types are
10591059
/// available on this target.
1060-
bool hasAArch64SVETypes() const { return HasAArch64SVETypes; }
1060+
bool hasAArch64ACLETypes() const { return HasAArch64ACLETypes; }
10611061

10621062
/// Returns whether or not the RISC-V V built-in types are
10631063
/// available on this target.

clang/include/clang/Basic/TokenKinds.def

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,12 +687,6 @@ KEYWORD(__bool , KEYALTIVEC|KEYZVECTOR)
687687
ALIAS("__fp16", half , KEYALL)
688688
KEYWORD(__bf16 , KEYALL)
689689

690-
// ARM NEON types
691-
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
692-
KEYWORD(Name, KEYACLE)
693-
#define SVE_TYPE(Name, Id, SingletonId)
694-
#include "clang/Basic/AArch64SVEACLETypes.def"
695-
696690
// OpenCL Extension.
697691
KEYWORD(half , HALFSUPPORT)
698692

clang/include/clang/Sema/DeclSpec.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,6 @@ class DeclSpec {
321321
#define GENERIC_IMAGE_TYPE(ImgType, Id) \
322322
static const TST TST_##ImgType##_t = clang::TST_##ImgType##_t;
323323
#include "clang/Basic/OpenCLImageTypes.def"
324-
325-
#define NEON_VECTOR_TYPE(Name, BaseType, ElBits, NumEls, VectorKind) \
326-
static const TST TST_##Name = clang::TST_##Name;
327-
#define SVE_TYPE(Name, Id, SingletonId)
328-
#include "clang/Basic/AArch64SVEACLETypes.def"
329-
330324
#define HLSL_INTANGIBLE_TYPE(Name, Id, SingletonId) \
331325
static const TST TST_##Name = clang::TST_##Name;
332326
#include "clang/Basic/HLSLIntangibleTypes.def"

clang/include/clang/Serialization/ASTBitCodes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1129,7 +1129,7 @@ enum PredefinedTypeIDs {
11291129
#include "clang/Basic/OpenCLExtensionTypes.def"
11301130
// \brief SVE types with auto numeration
11311131
#define SVE_TYPE(Name, Id, SingletonId) PREDEF_TYPE_##Id##_ID,
1132-
#include "clang/Basic/AArch64SVEACLETypes.def"
1132+
#include "clang/Basic/AArch64ACLETypes.def"
11331133
// \brief PowerPC MMA types with auto numeration
11341134
#define PPC_VECTOR_TYPE(Name, Id, Size) PREDEF_TYPE_##Id##_ID,
11351135
#include "clang/Basic/PPCTypes.def"

0 commit comments

Comments
 (0)