Ivan Krysak
47a1869695
tests: ensure architecture is always available
2025-04-17 11:19:17 +03:00
Ivan Krysak
dce5c1a02c
NamingConfiguration: pull more prefixes inside
...
Unify additional values that used to be hardcoded in the old backend
under the same naming configuration root.
2025-04-17 11:19:17 +03:00
Ivan Krysak
f070f1f1e1
Model: sunset double name system
2025-04-17 11:19:17 +03:00
Lauri Vasama
3ca3653333
Convert Clift type handles to use locations
2025-03-24 09:27:57 +02:00
Lauri Vasama
e9c329e51d
Rename Clift unique handle to handle
2025-03-24 09:26:43 +02:00
Lauri Vasama
5479a5de88
Add special handling of aggregate initializers
2025-03-24 09:26:43 +02:00
Lauri Vasama
2f64025dc9
Fix Clift backend double negation emission
2025-03-24 09:26:43 +02:00
Lauri Vasama
5f475739ef
Rename reinterpret, add convert cast
2025-03-24 09:26:43 +02:00
Lauri Vasama
f884642f59
Overhaul clift.struct, clift.union assembly syntax
...
Old syntax:
```
unique_handle = "/model-type/1",
name = "my_struct",
size = 2,
fields = [
<
offset = 0
name = "",
type = !t
>,
<
offset = 1,
name = "my_field",
type = !t
>
]
>
unique_handle = "/model-type/1",
name = "my_union",
fields = [
<
offset = 0,
name = "",
type = !t
>,
<
offset = 0,
name = "my_field",
type = !t
>
]
>
```
New syntax:
```
"/model-type/1" as "my_struct" : size(1) {
offset(0) : !t,
offset(1) as "my_field" : !t
}
>
"/model-type/1" as "my_union" : {
!t,
"my_field" : !t
}
>
```
2025-03-24 09:26:43 +02:00
Lauri Vasama
5bd481ae5a
Overhaul clift.function assembly syntax
...
Old syntax:
```
unique_handle = "/model-type/1",
name = "my_function",
return_type = !t,
argument_types = [
!t
]
>
```
New syntax:
```
"/model-type/1" as "my_function" : !t(!t)
>
```
* Rename clift.function mnemonic to clift.func.
2025-03-24 09:26:43 +02:00
Lauri Vasama
281bf283e2
Overhaul clift.typedef assembly syntax
...
Old syntax:
```
unique_handle = "/model-type/1",
name = "my_typedef",
underlying_type = !t
>
```
New syntax:
```
"/model-type/1" as "my_typedef" : !t
>
```
2025-03-24 09:26:43 +02:00
Lauri Vasama
ea78766f10
Overhaul clift.enum assembly syntax
...
Old syntax:
```
unique_handle = "/model-type/1",
name = "my_enum",
underlying_type = !t,
fields = [
<
name = "my_enumerator",
raw_value = 42
>
]
>
```
New syntax:
```
"/model-type/1" as "my_enum" : !t {
42 as "my_enumerator"
}
>
```
2025-03-24 09:26:43 +02:00
Lauri Vasama
8482bcbf90
Overhaul clift.defined assembly syntax
...
Old syntax:
```
!clift.defined<#t>
!clift.defined<is_const = true, #t>
```
New syntax:
```
!clift.defined<#t>
!clift.defined<const #t>
```
2025-03-24 09:26:43 +02:00
Lauri Vasama
64fc21e9dd
Overhaul clift.pointer assembly syntax
...
Old syntax:
```
!clift.pointer<pointer_size = 8, pointee_type = !t>
!clift.pointer<is_const = true, pointer_size = 8, pointee_type = !t>
```
New syntax:
```
!clift.ptr<8 to !t>
!clift.ptr<const 8 to !t>
```
2025-03-24 09:26:43 +02:00
Lauri Vasama
872b157774
Overhaul clift.array assembly syntax
...
Old syntax:
```
!clift.array<elements_count = 42, element_type = !t>
```
New syntax:
```
!clift.array<42 x !t>
```
2025-03-24 09:26:43 +02:00
Lauri Vasama
eaf1bf35aa
Overhaul clift.primitive assembly syntax
...
Old syntax:
```
!clift.primitive<SignedKind 8>
!clift.primitive<is_const = true, SignedKind 8>
```
New syntax:
```
!clift.primitive<signed 8>
!clift.primitive<const signed 8>
```
2025-03-24 09:26:43 +02:00
Lauri Vasama
e08a8e766b
Set register set type name in Clift import
2025-03-24 09:26:43 +02:00
Lauri Vasama
20cb57a105
Fix redundant cast parentheses in Clift backend
2025-03-24 09:26:42 +02:00
Lauri Vasama
23b47f825e
Add Clift AggregateOp
2025-03-24 09:17:38 +02:00
Lauri Vasama
bf625c631a
Improve Clift CallOp syntax
2025-03-24 09:17:36 +02:00
Lauri Vasama
1b63797640
Add Clift TernaryOp
2025-03-19 12:57:22 +02:00
Lauri Vasama
747a792f0f
Add Clift pointer arithmetic ops
2025-03-19 12:57:22 +02:00
Lauri Vasama
66246218b7
Add Clift StringOp
2025-03-19 12:57:21 +02:00
Lauri Vasama
888d529d93
Fix Clift return type verification
2025-03-19 12:57:20 +02:00
Lauri Vasama
08c2c0a477
Remove ScalarTupleType
...
After converting type IDs to unique handles it was decided to remove
scalar tuple types in favour of generated structs with non-model unique
handles.
2025-03-19 12:57:18 +02:00
Lauri Vasama
386efffb2f
Convert TypeDefinitionAttr ID to UniqueHandle
2025-03-19 12:57:17 +02:00
Lauri Vasama
86126db366
Fix Clift composite type verify on parsing
2025-03-19 12:57:17 +02:00
Lauri Vasama
6343bfcb40
Add c-verify pass
2025-01-30 14:52:47 +02:00
Lauri Vasama
b7047d3854
Remove Clift backend PTML tags unit test
2025-01-29 23:58:24 +01:00
Pietro Fezzardi
8114c19164
Replace WIP comment with TODO
2025-01-29 15:17:15 +01:00
Lauri Vasama
96312ce164
Add Clift C Backend LIT tests
2025-01-10 08:04:20 +02:00
Lauri Vasama
8515ffffce
Move Clift label C++ unit test to LIT
2025-01-10 08:03:20 +02:00
Lauri Vasama
aaddafa15b
Add check for conflicting local names in Clift
2025-01-10 08:03:20 +02:00
Lauri Vasama
4cedc22efb
Merge access ops into AccessOp with indirect flag
2025-01-02 11:25:32 +02:00
Lauri Vasama
fe2e70e885
Improve label and goto ops
2025-01-02 11:25:32 +02:00
Alessandro Di Federico
143c315196
Merge revng-c into revng
2024-11-21 10:50:55 +01:00
Lauri Vasama
2d2fe890fb
Add Clift expression operations
2024-10-31 08:41:25 +01:00
Lauri Vasama
e1b55fd5c3
Add custom assembly format for Clift FunctionOp
2024-10-31 08:41:25 +01:00
Lauri Vasama
2350f91c48
Use symbol attribute for GlobalVariableOp
2024-10-31 08:41:25 +01:00
Lauri Vasama
c29a71a0d9
Add colon in clift.undef assembly format
2024-10-31 08:41:25 +01:00
Giacomo Vercesi
212cfdc613
mlir_lit_tests: generate proper tar file
...
Using an empty file as a tar file is not 100% compliant. Use an actual
`tar` invocation to generate the file.
2024-10-01 20:34:38 +02:00
Lauri Vasama
35759476b6
Add Clift LIT/FileCheck tests
...
Some C++ unit tests were also converted into more easily maintainable
LIT/FileCheck tests.
2024-09-04 10:58:02 +02:00
Lauri Vasama
c821fd0455
Remove Clift FunctionArgumentAttr
...
The FunctionArgumentAttr was removed in order to better conform to the
builtin FunctionOpInterface. The FunctionOpInterface exposes the
argument and result types as array attributes of mlir::Type, and this
was difficult when each argument was wrapped in a FunctionArgumentAttr.
Debug names of the function types arguments from the model is currently
lost in the conversion to MLIR, but when the conversion for functions
themselves is implemented, the names can be added to the function
operations as argument attributes.
2024-09-04 10:58:02 +02:00
Lauri Vasama
0775ad4bd1
Fix Clift model import LIT tests
2024-09-04 10:58:02 +02:00
Ivan Krysak
94a0ad6b93
Adopt reworked model::Type
2024-06-27 11:07:01 +02:00
Ivan Krysak
3705906074
Model: rename Type into TypeDefinition
2024-06-27 11:07:01 +02:00
Alessandro Di Federico
61358cd862
Clift: adopt revng pipe for unit testing
2024-06-18 17:56:24 +02:00
Lauri Vasama
cccee1ed99
Add structured Clift type alias generation
2024-06-05 15:07:23 +02:00
Lauri Vasama
4a21b8a09b
Add LIT/FileCheck tests for model type import
2024-05-29 15:43:35 +02:00
Lauri Vasama
817b2e1a65
Set revng prefix in MLIR LIT tests
2024-05-29 15:43:35 +02:00