mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge pull request #19862 from jketema/complex
C++: Support more complex 16-bit float types
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class BuiltinType extends @builtintype {
|
||||
string toString() { none() }
|
||||
}
|
||||
|
||||
from BuiltinType type, string name, int kind, int kind_new, int size, int sign, int alignment
|
||||
where
|
||||
builtintypes(type, name, kind, size, sign, alignment) and
|
||||
if
|
||||
type instanceof @complex_fp16 or
|
||||
type instanceof @complex_std_bfloat16 or
|
||||
type instanceof @complex_std_float16
|
||||
then kind_new = 2
|
||||
else kind_new = kind
|
||||
select type, name, kind_new, size, sign, alignment
|
||||
2509
cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme
Normal file
2509
cpp/downgrades/7bc12b02a4363149f0727a4bce07952dbb9d98aa/old.dbscheme
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,3 @@
|
||||
description: Introduce new complex 16-bit floating-point types
|
||||
compatibility: backwards
|
||||
builtintypes.rel: run builtintypes.qlo
|
||||
4
cpp/ql/lib/change-notes/2025-06-24-float16.md
Normal file
4
cpp/ql/lib/change-notes/2025-06-24-float16.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Added support for `__fp16 _Complex` and `__bf16 _Complex` types
|
||||
@@ -858,6 +858,15 @@ private predicate floatingPointTypeMapping(
|
||||
or
|
||||
// __mfp8
|
||||
kind = 62 and base = 2 and domain = TRealDomain() and realKind = 62 and extended = false
|
||||
or
|
||||
// _Complex __fp16
|
||||
kind = 64 and base = 2 and domain = TComplexDomain() and realKind = 54 and extended = false
|
||||
or
|
||||
// _Complex __bf16
|
||||
kind = 65 and base = 2 and domain = TComplexDomain() and realKind = 55 and extended = false
|
||||
or
|
||||
// _Complex std::float16_t
|
||||
kind = 66 and base = 2 and domain = TComplexDomain() and realKind = 56 and extended = false
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -693,6 +693,9 @@ case @builtintype.kind of
|
||||
| 61 = @complex_std_float128 // _Complex _Float128
|
||||
| 62 = @mfp8 // __mfp8
|
||||
| 63 = @scalable_vector_count // __SVCount_t
|
||||
| 64 = @complex_fp16 // _Complex __fp16
|
||||
| 65 = @complex_std_bfloat16 // _Complex __bf16
|
||||
| 66 = @complex_std_float16 // _Complex std::float16_t
|
||||
;
|
||||
|
||||
builtintypes(
|
||||
|
||||
@@ -336,6 +336,18 @@
|
||||
<k>@scalable_vector_count</k>
|
||||
<v>124</v>
|
||||
</e>
|
||||
<e>
|
||||
<k>@complex_fp16</k>
|
||||
<v>124</v>
|
||||
</e>
|
||||
<e>
|
||||
<k>@complex_std_bfloat16</k>
|
||||
<v>124</v>
|
||||
</e>
|
||||
<e>
|
||||
<k>@complex_std_float16</k>
|
||||
<v>124</v>
|
||||
</e>
|
||||
<e>
|
||||
<k>@pointer</k>
|
||||
<v>455609</v>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,2 @@
|
||||
description: Support more complex 16-bit floating-point types
|
||||
compatibility: full
|
||||
@@ -5,10 +5,13 @@
|
||||
| file://:0:0:0:0 | _Complex _Float64 |
|
||||
| file://:0:0:0:0 | _Complex _Float64x |
|
||||
| file://:0:0:0:0 | _Complex _Float128 |
|
||||
| file://:0:0:0:0 | _Complex __bf16 |
|
||||
| file://:0:0:0:0 | _Complex __float128 |
|
||||
| file://:0:0:0:0 | _Complex __fp16 |
|
||||
| file://:0:0:0:0 | _Complex double |
|
||||
| file://:0:0:0:0 | _Complex float |
|
||||
| file://:0:0:0:0 | _Complex long double |
|
||||
| file://:0:0:0:0 | _Complex std::float16_t |
|
||||
| file://:0:0:0:0 | _Decimal32 |
|
||||
| file://:0:0:0:0 | _Decimal64 |
|
||||
| file://:0:0:0:0 | _Decimal128 |
|
||||
|
||||
@@ -25,10 +25,13 @@
|
||||
| file://:0:0:0:0 | _Complex _Float64 | 16 |
|
||||
| file://:0:0:0:0 | _Complex _Float64x | 32 |
|
||||
| file://:0:0:0:0 | _Complex _Float128 | 32 |
|
||||
| file://:0:0:0:0 | _Complex __bf16 | 4 |
|
||||
| file://:0:0:0:0 | _Complex __float128 | 32 |
|
||||
| file://:0:0:0:0 | _Complex __fp16 | 4 |
|
||||
| file://:0:0:0:0 | _Complex double | 16 |
|
||||
| file://:0:0:0:0 | _Complex float | 8 |
|
||||
| file://:0:0:0:0 | _Complex long double | 32 |
|
||||
| file://:0:0:0:0 | _Complex std::float16_t | 4 |
|
||||
| file://:0:0:0:0 | _Decimal32 | 4 |
|
||||
| file://:0:0:0:0 | _Decimal64 | 8 |
|
||||
| file://:0:0:0:0 | _Decimal128 | 16 |
|
||||
|
||||
@@ -7,10 +7,13 @@
|
||||
| file://:0:0:0:0 | _Complex _Float64 | _Complex _Float64 |
|
||||
| file://:0:0:0:0 | _Complex _Float64x | _Complex _Float64x |
|
||||
| file://:0:0:0:0 | _Complex _Float128 | _Complex _Float128 |
|
||||
| file://:0:0:0:0 | _Complex __bf16 | _Complex __bf16 |
|
||||
| file://:0:0:0:0 | _Complex __float128 | _Complex __float128 |
|
||||
| file://:0:0:0:0 | _Complex __fp16 | _Complex __fp16 |
|
||||
| file://:0:0:0:0 | _Complex double | _Complex double |
|
||||
| file://:0:0:0:0 | _Complex float | _Complex float |
|
||||
| file://:0:0:0:0 | _Complex long double | _Complex long double |
|
||||
| file://:0:0:0:0 | _Complex std::float16_t | _Complex std::float16_t |
|
||||
| file://:0:0:0:0 | _Decimal32 | _Decimal32 |
|
||||
| file://:0:0:0:0 | _Decimal64 | _Decimal64 |
|
||||
| file://:0:0:0:0 | _Decimal128 | _Decimal128 |
|
||||
|
||||
@@ -6,10 +6,13 @@
|
||||
| _Complex _Float64 | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex _Float64x | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex _Float128 | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex __bf16 | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex __float128 | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex __fp16 | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex double | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex float | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex long double | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Complex std::float16_t | BinaryFloatingPointType, ComplexNumberType | | | | |
|
||||
| _Decimal32 | Decimal32Type | | | | |
|
||||
| _Decimal64 | Decimal64Type | | | | |
|
||||
| _Decimal128 | Decimal128Type | | | | |
|
||||
|
||||
Reference in New Issue
Block a user