C++: Handle Arm SVE in the IR

This commit is contained in:
Jeroen Ketema
2025-06-23 12:33:42 +02:00
parent 4eb98fc46e
commit ca961386b2
8 changed files with 336 additions and 186 deletions

View File

@@ -54,6 +54,8 @@ private predicate isDeeplyConstBelow(Type t) {
or
isDeeplyConst(t.(GNUVectorType).getBaseType())
or
isDeeplyConst(t.(ScalableVectorType).getBaseType())
or
isDeeplyConst(t.(FunctionPointerIshType).getBaseType())
or
isDeeplyConst(t.(PointerWrapper).getTemplateArgument(0))

View File

@@ -29,6 +29,10 @@ private int getTypeSizeWorkaround(Type type) {
not arrayType.hasArraySize() and
result = getPointerSize()
)
or
// Scalable vectors are opaque and not of fixed size. Use 0 as a substitute.
type instanceof ScalableVectorType and
result = 0
)
)
}
@@ -136,6 +140,8 @@ private predicate isOpaqueType(Type type) {
type instanceof PointerToMemberType // PTMs are missing size info
or
type instanceof ScalableVectorCount
or
type instanceof ScalableVectorType
}
/**