Alessandro Di Federico
c5c657d11b
Lift: increase determinism
2025-04-15 15:31:10 +02:00
Alessandro Di Federico
de2a96c34c
AVI: set the extremal value ot top
2025-04-15 15:31:10 +02:00
Alessandro Di Federico
c2461377cd
Merge branch 'feature/s3-storage-python-2-fixes'
2025-04-07 14:42:11 +02:00
Giacomo Vercesi
38aefea930
ResettableTimer: fix deadlock
...
The `ResettableTimer` class' code did not account for the `function`
attribute to possibly call the timer, creating a deadlock because the
lock was already taken while calling the function. Move the function
call out of the lock.
2025-04-07 10:36:36 +02:00
Giacomo Vercesi
e6fcca3dc6
TupleTreeContainer: fix infinite recursion
...
Fix an infinite recursion caused by renaming the `ContainerBase::load`
function to `ContainerBase::loadImpl`.
2025-04-07 10:35:20 +02:00
Alessandro Di Federico
d1a7eff8cb
Merge branch 'feature/s3-storage-python-2'
2025-04-03 15:59:35 +02:00
Giacomo Vercesi
11f1e532c6
Implement dirty bit on Container
...
Add a `Dirty` boolean to the `ContainerBase` class. This will be set to
true when the container mutates itself (e.g. remove, mergeBack, clear).
The dirty bit is reset when running `PipelineManager.store`.
2025-04-03 15:59:18 +02:00
Giacomo Vercesi
f740badd68
PipelineManager: drop storeContext
...
The `storeContext` function was a misguided attempt to performance
optimization. Without storing all the containers and the invalidation
metadata the resume directory would be corrupt by just storing the
context.
2025-04-03 15:59:18 +02:00
Giacomo Vercesi
e634861c1a
Implement SyncingManager
...
Implement the SyncingManager class which wraps the Manager and implements
save syncing features, which comprise autosave and saving via
synchronizers.
2025-04-03 15:59:18 +02:00
Pietro Fezzardi
b1148d3ece
Merge branch 'feature/decidewithgotos'
2025-04-02 16:48:17 +02:00
Andrea Gussoni
bb4bdec403
Pipeline: introduce dagify and decidewithgotos
...
The `prepare-for-clift` artifact now encompasses the run of `dagify` and
`decidewithgotos` (`select-scope` + `ids`).
2025-04-02 16:47:14 +02:00
Andrea Gussoni
3d5ec32113
IDS: add unit tests
...
Add unit tests for the `InlineDivergentScopes` pass alone.
2025-04-02 16:47:14 +02:00
Andrea Gussoni
40ebac06cc
IDS: introduce pass
...
Introduce the `inline-divergent-scopes` pass. This pass in is charge of
reducing the exit nodes in a `ScopeGraph`, applying the _Inline
Divergent Scopes_ transformation, which is able, in presence of
divergent exits nodes, wrt. to a conditional, to remove the exit node
and to transform the `ScopeGraph` in a form where semantics is
preserved.
2025-04-02 16:47:14 +02:00
Andrea Gussoni
dadfbc27da
SelectScope: add unit tests
...
Add unit tests for the `SelectScope` pass alone.
2025-04-02 16:47:14 +02:00
Andrea Gussoni
47fac0d948
SelectScope: introduce pass
...
Introduce the `select-scope` pass. This pass is in charge of enforcing
the relative decidedness property for all the nodes in the `ScopeGraph`,
wrt. to all the conditional nodes. It does this by applying the
relative decidedness definition, electing one scope for each conditional
node in the graph, and by transforming all the edges that would violate
the property into goto edges.
2025-04-02 16:47:14 +02:00
Andrea Gussoni
e0ff6f1360
ESE: extend command line flag
2025-04-02 16:47:14 +02:00
Andrea Gussoni
c14c2d64dc
DAGify: reorder FunctionPass method declarations
2025-04-02 16:47:14 +02:00
Andrea Gussoni
023807f0bb
DAGify: remove useless llvm:: namespace
2025-04-02 16:47:14 +02:00
Andrea Gussoni
f92db5d4a6
DAGify: use the makeGotoEdge helper
2025-04-02 16:47:14 +02:00
Andrea Gussoni
21be052d6f
ScopeGraph: introduce the makeGotoEdge helper
...
Introduce the `makeGotoEdge` helper to the `ScopeGraphBuilder` class,
that can be used to handle the transformation of a solid edge into a
`goto` edge, taking care of the creation of the `goto` block and the
redirection of the edges.
2025-04-02 16:47:14 +02:00
Andrea Gussoni
1482a5e110
ScopeGraph: improve ScopeGraph .dot name
...
Include the function name in the filename of the dumped `.dot` of the
`ScopeGraph`.
2025-04-02 16:47:14 +02:00
Andrea Gussoni
a7e58b2749
GraphAlgorithms: improve return type
...
Improve the definition of the return type of `nodesBetween`, obtaining
the type of the elements in the `Set`s by passing through the
`GraphTraits::NodeRef` type, which enables us to handle more generic
situations, where `GraphT` includes a `View` over a graph.
2025-04-02 16:47:14 +02:00
Alessandro Di Federico
f780df8d6a
Merge branch 'feature/s3-storage-python'
2025-03-28 14:23:15 +01:00
Giacomo Vercesi
42f8321f59
Fix S3 storage test
...
Fix the storage test by converting it from bash to python and also
testing all the occasions where a save should be triggered.
2025-03-28 14:23:10 +01:00
Giacomo Vercesi
6a10419b69
Implement S3Synchronizer
...
Implement a downstream load/save handler in `revng.internal.api.Manager`
class which handles loading and saving files from a local directory to
a s3 server.
2025-03-28 14:23:10 +01:00
Giacomo Vercesi
1aa9c61c31
LocalStorageClient: save filelist
...
When saving to disk, `LocalStorageClient` will also save a file named
`file_list.yml` which will list the list of files, which is needed for
downstream save handlers to efficently save.
2025-03-27 12:45:29 +01:00
Giacomo Vercesi
f99aee6cf6
StorageClient: disable S3StorageClient
...
Disable creation of `S3StorageClient` from
`StorageClient::fromPathOrURL`.
2025-03-26 16:36:20 +01:00
Pietro Fezzardi
7821d9330c
Merge branch 'feature/clift-changes'
2025-03-24 15:34:37 +01:00
Lauri Vasama
3ca3653333
Convert Clift type handles to use locations
2025-03-24 09:27:57 +02:00
Lauri Vasama
d6a2ee387e
Add aliases for Clift types without handles
2025-03-24 09:26:43 +02:00
Lauri Vasama
e9c329e51d
Rename Clift unique handle to handle
2025-03-24 09:26:43 +02:00
Lauri Vasama
1325c75979
Move Clift op custom parsers out of header
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
c85275cc70
Add expression region utilities in CliftOps.h
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
b97c55980b
Change Clift type constraints to ValueType
...
clift.indirection %p : <8 to !int32_t>
The concrete type kinds would cause types in the assembly to be emitted
without type mnemonics. See the example above.
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
e2f4af30e9
Add custom builder for Clift FunctionOp
2025-03-24 09:26:43 +02:00
Lauri Vasama
8f44ebe12d
Improve Clift type constraint error messages
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
a9727e198c
Fix return statement emission in Clift backend
2025-03-24 09:25:30 +02:00