Commit Graph

154 Commits

Author SHA1 Message Date
Ivan Krysak 31068f3d43 Pipeline: introduce an optional model path 2025-05-07 10:48:49 +02:00
Giacomo Vercesi 101cac84ea FileContainer: use TemporaryFile
Ditch the manual management of the temporary file owned by
`FileContainer` and instead rely on the functionality offered by
`TemporaryFile`.
2025-05-05 16:02:40 +02:00
Khaled Ismaeel a52f1f17c2 Add automatic migrations in PipelineManager 2025-04-30 15:08:45 +02:00
Khaled Ismaeel 53a5ff07cf Remove embedded TUPLE-TREE-YAML 2025-04-30 15:08:45 +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
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
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Giacomo Vercesi 761e84fc9f Add revng::cantFail
Add the `revng::cantFail` function which allows to wrap functions with
`std::error_code` and check their result. This is analogous to
`llvm::cantFail` for `llvm::Error`.
2025-02-05 10:46:00 +01:00
Lauri Vasama bda55aac19 Add Clift C Backend 2025-01-10 08:04:20 +02: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
Ivan Krysak 1eb80ecd2d Introduce an error creation helper 2024-11-06 15:20:37 +02:00
Alessandro Di Federico bd84bd7f2e Rework --analyze and --analyses-list 2024-10-31 17:19:51 +01:00
Alessandro Di Federico 8e6942451e Import revng-c's Kinds.h 2024-10-31 17:19:51 +01:00
Alessandro Di Federico d633b414e1 Import revng-c's Ranks.h 2024-10-31 17:19:51 +01:00
Alessandro Di Federico a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Alessandro Di Federico 05c01e5216 Drop TargetListContainer 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 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 45f29c0f20 FunctionPassImpl: getAnalysis for functions
`pipeline::FunctionPass` is actually a ModulePass, therefore, in order
to use `getAnalysis` on a pass running with function granularity, we
need to use the `getAnalysis` overload accepting a `llvm::Function`.
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 850276f5c8 Minor changes 2024-09-27 12:07:16 +02:00
Ivan Krysak 0aa2ae7f08 Pipes: introduce a primitive rank 2024-06-27 11:05:52 +02:00
Ivan Krysak 150d992368 Pipes: rename Type rank into TypeDefinition 2024-06-27 11:05:51 +02:00
Ivan Krysak 6a1018b860 Remove unused linter suppressors 2024-06-27 11:05:48 +02:00
Ivan Krysak ac587cbb4f Model: rename Type into TypeDefinition 2024-06-27 11:05:48 +02:00
Ivan Krysak b2959e36df Minor improvements 2024-06-27 11:05:48 +02:00
Alessandro Di Federico f60c1bb4ad s/TrackGuard/DisableTracking/ 2024-06-20 10:24:51 +02:00
Alessandro Di Federico c3733f293a s/RevngPasses/FunctionPass/g 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 bce1d6c0f3 Adopt invalidation along the core pipeline 2024-06-20 10:24:50 +02:00
Alessandro Di Federico a47c6e81dd FunctionKind::appendAllTargets: disable tracking 2024-06-20 10:24:50 +02:00
Alessandro Di Federico b0d897b87d Minor changes 2024-06-20 10:24:49 +02:00
Massimo Fioravanti 7ee8c8000d Introduce revng pipe 2024-06-20 09:57:36 +02:00
Alessandro Di Federico c061f1f971 Make Pipe::checkPrecondition mandatory 2024-05-22 10:25:25 +02:00
Alessandro Di Federico 346b367c19 Drop revng efa-extractcfg 2024-02-09 10:04:25 +01:00
Alessandro Di Federico d9367954a4 Convert all public strings to kebab-case 2024-02-09 10:04:24 +01:00
Alessandro Di Federico f2be46d4da ToolCLOptions: introduce --model 2024-02-09 10:04:21 +01:00
Giacomo Vercesi fc4c91e333 Introduce PopulateTargetListContainer
This commit adds the `TargetListContainer` container that allows storing
a list of target for a fixed Kind. Moreover the
`PopulateTargetListContainer` pipe has been added that allows adding all
targets to a `TargetListContainer` from a `Kind` via the
`appendAllTargets` method.
2024-01-26 19:13:58 +01:00
Giacomo Vercesi 11938e40da Introduce TypeStringMap
Building upon the previous commit, introduce `TypeStringMap` which is a
container for type-wise strings.
2024-01-26 19:13:58 +01:00
Giacomo Vercesi 5f8143207d Generalize FunctionStringMap
Generalize `FunctionStringMap` into `detail::GenericStringMap`, which
supports any `Depth=1` rank. `FunctionStringMap` remains as an `using`
with `Rank = ranks::Function`.
2024-01-26 19:13:58 +01:00
Giacomo Vercesi 6ac7c0c557 Implement container cache pruning
Implement the pruning of container caches (resume directory) when there
is a mismatch between the current revng components' hash and the saved
one. This functionality is activated via `-check-components-version`.
2024-01-26 17:46:21 +01:00
Giacomo Vercesi af1e927e7e Drop ApplyDiffAnalysis' files
The files `ApplyDiffAnalysis.{cpp,h}` were mis-re-merged in c276a439.
Drop them.
2024-01-26 17:46:21 +01:00
Massimo Fioravanti c276a439b5 Add pipeline invalidation
Replace the stub implementation of invalidation with the proper
implementation. A ReadPathCache is added to each global so that it can
keep tracks of what target are associated to which read paths.
2024-01-02 11:14:56 +01:00
Massimo Fioravanti 643d96698d Preliminaries for pipeline invalidation
Fix various bugs already present in the codebase.
2024-01-02 11:06:48 +01:00
Giacomo Vercesi b6d1f178fd FunctionStringMap: UncompressedSize in index
Add the `UncompressedSize` field in the index file.
2023-12-13 14:45:10 +01:00