Commit Graph

758 Commits

Author SHA1 Message Date
Tommaso Fontana 80eb02c207 Pypeline: merge pypeline 2025-09-10 12:05:15 +02:00
Ivan Krysak 97aa3c8247 std::string: use implicit default constructor 2025-07-23 11:38:53 +02:00
Ivan Krysak 290d2e2c57 ptml::CTypeBuilder: rename into ModelCBuilder 2025-07-23 11:38:53 +02:00
Ivan Krysak c7c61dbc04 New backend: drop leading _ in variable names 2025-07-23 11:38:51 +02:00
Andrea Gussoni 6a90277db2 ScopeGraph: rename scope-graph-dumper 2025-07-23 11:34:13 +02:00
Andrea Gussoni c060f07ecd ScopeGraph: add scope-graph-output cl::opt 2025-07-23 11:34:13 +02:00
Andrea Gussoni 1ccce1c76a ScopeGraph: remove the ScopeGraphLogger library 2025-07-23 11:34:13 +02:00
Lauri Vasama 780e774b20 Add Clift legalization pipe 2025-07-17 16:45:03 +02:00
Lauri Vasama b9ce0a87df Add Clift model verification 2025-07-17 16:45:03 +02:00
Lauri Vasama fa184b9212 Add Clift backend support for pointer sizes 2025-07-17 16:45:03 +02:00
Lauri Vasama 3b58a5bf4e Fix StackArgumentsType to Clift import
The stack argument was previously imported as a pointer.
2025-07-17 16:45:03 +02:00
Lauri Vasama fc682383e9 Implement Clift bytecode
Fixes bytecode emission of class types with very large trees of members.
See the new unit test: union-with-large-tree.mlir .
2025-07-17 16:45:03 +02:00
Lauri Vasama 936c0106e4 Add truncate/extend between pointers 2025-07-17 16:45:03 +02:00
Lauri Vasama 50c3c8f95a Fix Clift union recursion parsing issue 2025-07-17 16:45:03 +02:00
Giacomo Vercesi d62b7b6b1a TTG: inline root type in schema
Move the root type inside the schema definition, as it is a property of
it and not of the generator.
2025-06-25 15:40:13 +02:00
Andrea Gussoni 3527291bd9 IDS: multiple divergence implementation
Perform the IDS transformation, by taking into account possible multiple
divergent scopes for a certain conditional node at the same time.

This reduces the run times, since it reduces the number of time IDS is
called on a conditional, but mostly proceduce a more _compact_
`ScopeGraph`, where all the divergent scopes for a certain conditional
node rejoing the path toward the one true exit in a single point,
instead of having a chain of IDS resulting regions.

Make IDS unit tests compliant with the new multiple divergence
implementation.
2025-06-12 15:31:38 +02:00
Lauri Vasama c956904b8e Add Clift backend pipe and update tests 2025-06-04 15:13:47 +02:00
Lauri Vasama 73ca618c4d Simplify import-clift-types pipe and tests 2025-06-04 15:13:47 +02:00
Lauri Vasama cc94e2d290 Constrain returnable types 2025-06-04 15:13:47 +02:00
Lauri Vasama 047511b1ed Remove Clift break and continue ops 2025-06-04 15:13:47 +02:00
Lauri Vasama 3e065cb23d Remove local and label names 2025-06-04 15:13:47 +02:00
Lauri Vasama f0091e699f Remove clift::ModuleOp
A new dialect attribute is instead used to verify mlir::ModuleOp:

```
module attributes {clift.module} {
}
```
2025-06-04 15:13:47 +02:00
Lauri Vasama 336b18d937 Overhaul Clift type syntax
* Removed syntax for defined type attributes.
* Added !clift.const<T> and removed const syntax from types kinds.
* Some restructuring of class type internals.
2025-06-04 15:13:47 +02:00
Lauri Vasama 893ca56921 Require separate output arguments in revng pipe
Each mutable container used by the pipe now requires a separator output
path argument.
2025-06-04 15:13:47 +02:00
Ivan Krysak 2c7cc0edab Model: rework migration tests
This makes them a lot more modular, making it easier to add similar
tests for future model versions.
2025-05-08 15:42:02 +02:00
Ivan Krysak a12439c008 Migration tests: add a test for model version 4 2025-05-08 15:42:02 +02:00
Ivan Krysak cc803f4912 Migration tests: switch to a cheaper artifact 2025-05-08 15:42:02 +02:00
Ivan Krysak eac296a99f Standardize PTML tag emission in c backend 2025-05-08 15:42:00 +02:00
Ivan Krysak 0d868894a2 model::Function: switch to indices as comment keys 2025-05-08 15:42:00 +02:00
Andrea Gussoni 80df1f3a42 MTGoTo: add unit test leveraging IDS ordering 2025-04-30 16:10:54 +02:00
Andrea Gussoni 6951611082 MTGoTo: introduce unit test 2025-04-30 16:10:54 +02:00
Andrea Gussoni 8ff68174ea ScopeGraph: use snake_case for Markers 2025-04-30 16:10:54 +02:00
Andrea Gussoni 71988af041 Fix MIT license 2025-04-30 16:10:54 +02:00
Khaled Ismaeel 2d5731b363 Add migration test 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 7156cace7b Drop multiversion support in Python model wrapper 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 030becfeba Adapt the build to the new schema version field
This is a followup to the commit where we introduced the `version`
field in the schema YAML.
2025-04-30 15:08:45 +02:00
Khaled Ismaeel 383af5b6b0 Add the version field to schemas YAML
Here we start restructuring the the schemas YAML such that it
contains a top-level `version` field. In this commit we only modify
the YAML, the build system changes will come later, to avoid
enormous commits.
2025-04-30 15:08:45 +02:00
Khaled Ismaeel 531d9b866c Remove the now-redundant HEADERS list 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 53a5ff07cf Remove embedded TUPLE-TREE-YAML 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 63469c9cd6 Use unified YAML schemas in the build process
In this commit we instruct the build system to use the unified schema
files  instead of collecting the `TUPLE-TREE-YAML` comments.

The fixes to C++ files are necessary because they depend on the order
of the fields in the schema, which was changed.
2025-04-30 15:08:45 +02:00
Khaled Ismaeel f384b10435 Check schemas into the codebase
These schema files are currently generated at build time by
collecting various TUPLE-TREE-YAML comments using the
`extract_yaml.py` script. In this commit we move them to the codebase
but we don't use them yet, this will be done at a later commit for
the sake of readability.
2025-04-30 15:08:40 +02:00
Ivan Krysak 79964eac74 Avoid ' misuse in error messages and comments 2025-04-17 16:41:21 +02:00
Ivan Krysak 57b5eb7f98 NameBuilder: allow different name checkers 2025-04-17 11:19:17 +03:00
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 1115319463 ABI-tests: adjust name checking asserts
Since `NameBuilder::name` can never return an empty string, these can
never fail. But instead of removing them, it's safer to check whether
all the functions have a "real" name coming from the debug information
instead.
2025-04-17 11:19:17 +03:00
Ivan Krysak f070f1f1e1 Model: sunset double name system 2025-04-17 11:19:17 +03:00
Ivan Krysak 645cf7fc2e NameBuilder: sunset deduplication
This reworks NameBuilder to ease the transition to the system where
the model will be guaranteed to never contain any name collisions, both
between user-specified names and the automatic ones.
2025-04-15 16:35:42 +03:00
Alessandro Di Federico de2a96c34c AVI: set the extremal value ot top 2025-04-15 15:31:10 +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