Commit Graph

202 Commits

Author SHA1 Message Date
Ivan Krysak 31068f3d43 Pipeline: introduce an optional model path 2025-05-07 10:48:49 +02:00
Giacomo Vercesi e3074ec29a revng artifact: omit kind
When working with `revng artifact`, omit the kind in both the output of
`--list` and the parameters taken specifying which targets to produce.
2025-05-07 10:48:48 +02:00
Alessandro Di Federico 3db971b8b4 Pipeline: invalidate if *any* input is invalidated
We used to invalidate only if *all* inputs were invalidated.
2025-05-07 08:36:44 +02:00
Giacomo Vercesi 50caf5ef9e Pipeline: allow analyses to not be available
An analysis can implement the `isAvailable` function which can tell
users if the analysis is available or not to be run.
2025-05-05 17:28:48 +02:00
Khaled Ismaeel a52f1f17c2 Add automatic migrations in PipelineManager 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 53a5ff07cf Remove embedded TUPLE-TREE-YAML 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
Giacomo Vercesi 0ac78dddba Fix codespell errors
Fix erros detected by the new version of `codespell`.
2025-04-24 13:22:14 +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 87872f9fc5 PipelineManager: add save-after-every-analysis
Add a command-line option to pipeline that saves after every analysis is
run.
2025-03-13 18:03:50 +01:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Alessandro Di Federico 2128a80cc8 Preserve metadata after Function::deleteBody
Also, introduce and adopt a simple helper class to get this right.
2025-01-28 12:19:16 +01:00
Giacomo Vercesi 05041a302a PipelineManager: save after running analyses
Save the context after an analysis (or analyses-list) has run. This
guarantees that at least the model is preserved in case of crash.
2024-12-20 12:24:28 +01:00
Alessandro Di Federico ade0603d3f Add docs for artifacts and analyses 2024-12-11 16:15:10 +01:00
Ivan Krysak 672ee5df50 Replace std::string_view with llvm::StringRef 2024-11-06 15:43:13 +02:00
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Giacomo Vercesi 8e65716ad8 Use zstd compression in pipeline
Use the zstd compression for:
* The `LLVMContainer` when serializing
* The invalidation cache when writing to disk
2024-10-30 21:57:55 +01:00
Alessandro Di Federico 9c47c92af2 Target::PathComponents: use SmallVector<1> 2024-10-30 19:30:04 +01:00
Alessandro Di Federico e9e9a958e6 PathTargetBimap: drop ReverseMap 2024-10-30 17:54:48 +01:00
Ivan Krysak 43f0304cb2 Pipeline: toString -> locationString 2024-10-15 09:12:55 +02:00
Alessandro Di Federico a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Alessandro Di Federico 07e964478d Invalidation deduceResults after pipe 2024-09-29 12:52:14 +02:00
Alessandro Di Federico 865ffb9892 Minor changes 2024-09-27 20:45:22 +02:00
Alessandro Di Federico 33cae7de12 Pipeline: reduce usage of Context 2024-09-27 12:07:18 +02:00
Alessandro Di Federico 6297537486 Drop Pipe::print 2024-09-27 12:07:18 +02:00
Alessandro Di Federico fbf79b5d1b Make Pipe::checkPrecondition optional 2024-09-27 12:07:18 +02:00
Alessandro Di Federico bc064244d6 s/deserialize/fromString/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico bdb5284540 Target::dump: use toString 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 42fb8455c2 Outline InvalidationMetadata::PipeWrapper 2024-09-27 12:07:17 +02:00
Alessandro Di Federico c1cbb4e9a0 Initialize pointers to nullptr 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 2cdedc71f4 s/serialize/toString/
We keep serialize for method dealing with streams.
If it returns a `std::string`, let's use `toString`.
2024-09-27 12:07:17 +02:00
Alessandro Di Federico c8d4381297 s/Context &Ctx/Context &Context/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico 9bdce8e5c4 s/ExecutionContext &Ctx/ExecutionContext &EC/g 2024-09-27 12:07:17 +02:00
Alessandro Di Federico ee724aae83 Make pipe names dynamic
This enables us to have the list of passes in the `generic-llvm-pipe`
name, which would be otherwise carrying poor information.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico 12a0a89e15 Ensure every pipe commits what it should
This commit is the final step in ensuring all the pipes commit what they
should. It also asserts this actually happens, enabling us to easily
catch future problems.
2024-09-27 12:07:16 +02:00
Alessandro Di Federico baea87f606 Pipeline: improving dump methods 2024-09-27 12:07:16 +02:00
Alessandro Di Federico 850276f5c8 Minor changes 2024-09-27 12:07:16 +02:00
Alessandro Di Federico 024c9abda2 Step: fix use-after-free 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 09bc315448 Pipeline: improve invalidation logging 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 3c839cb821 Pipe::mutableContainers: use running containers 2024-07-09 08:58:51 +02:00
Alessandro Di Federico 966caa4137 revng artifact: fix handling of target arguments
This commit adds to `revng artifact` help the part of the command line
accepting a list of targets.
Also, it fixes the parsing of targets.
2024-07-09 08:58:51 +02:00
Alessandro Di Federico 71135a56ab Make Target and friends YAML serializable 2024-06-20 10:24:51 +02:00
Alessandro Di Federico 32e6f3e303 Fix handling of -path version of analysis flags
Before this commit, the `*-path` flags required the non-`-path` flag
too.
2024-06-20 10:24:51 +02:00
Alessandro Di Federico 553d869d03 Drop Pipe::print method 2024-06-20 10:24:51 +02:00
Alessandro Di Federico 036e9282fe Disable invalidation on const containers 2024-06-20 10:24:51 +02:00
Alessandro Di Federico bce1d6c0f3 Adopt invalidation along the core pipeline 2024-06-20 10:24:50 +02:00
Alessandro Di Federico 831ed0db91 TaggedFunctionKind: fix tracking-related issues 2024-06-20 10:24:50 +02:00
Alessandro Di Federico c3751a8c5a Introduce Pipe::invalidate
This method enables pipes to specify a custom invalidation logic.  This
change enables us to supress automatic model tracking in certain parts
and then handle the consequences by hand.

Make sure you read the TODO before using this.
2024-06-20 10:24:50 +02:00
Alessandro Di Federico fd68c25aee Implement ContainerBase::dump{,ToDisk} 2024-06-20 10:24:49 +02:00