Commit Graph

141 Commits

Author SHA1 Message Date
Giacomo Vercesi 27f419c8cd Fix and ban namespace clobbering
Fix an instance where the `std` namespace got clobbered into the global
namespace by accident.
2026-02-16 10:34:38 +01:00
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Alessandro Di Federico 1dff54ba60 Make new backend independent from the old one 2025-12-03 17:59:18 +01:00
Giacomo Vercesi 153fcf2773 InitRevng: initialize LLVM components
In the constructor of `InitRevng` also call all the `llvm::initialize*`
functions. This is done to be less implementation-specific and having
these functions be called in
`LLVMPipelineRegistry.libraryInitialization`.
2025-11-17 10:04:13 +01:00
Alessandro Di Federico f8bd4c3bac Move around some files in preparation for libtcg
* Make the following private headers public:
  * Lift/CPUStateAccessAnalysisPass.h
  * Lift/CSVOffsets.h
  * Lift/PTCDump.h
  * Lift/VariableManager.h
* Move from revngSupport to revngLift:
  * IRAnnotators.{h,cpp}
  * SelfReferencingDbgAnnotationWriter.{h,cpp}
* Move from revngSupport to revngModel:
  * FunctionTags.{h,cpp}
  * ProgramCounterHandler.{h,cpp}
* Move from revngSupport to revngRecompile:
  * OriginalAssemblyAnnotationWriter.{h,cpp}
2025-10-24 15:34:11 +02:00
Ivan Krysak 25538385c8 Avoid using !! unless necessary
The only necessary place is when passing it into the  `BOOST_TEST`
macro, which doesn't convert its argument to `bool` internally.
2025-10-13 10:26:41 +03:00
Ivan Krysak 5717d835f8 Add missing llvm::Error checks 2025-10-13 10:26:37 +03:00
Ivan Krysak c11761ceb5 Pipes: drop unused invalidateFromDiff 2025-10-08 12:22:34 +03:00
Ivan Krysak 77ea07c364 Minor improvements 2025-10-08 12:22:30 +03:00
Ivan Krysak f1ee21c2cd Introduce isDebugLocationInvalid helper 2025-09-10 17:44:01 +02:00
Ivan Krysak 3c9aa5f4b2 Pipes: pull tryExtractAddress up 2025-07-23 11:38:50 +02:00
Ivan Krysak b5337d78da Minor Improvements 2025-07-23 11:38:50 +02:00
Lauri Vasama d70c9404f3 Add a helper for LLVM IR lookup by meta-address 2025-07-17 16:45:03 +02:00
Giacomo Vercesi 79d20d343b FilePath: fix addExtension
When working with `stdin` and `stdout`, the `addExtension` function
should return std::nullopt, since concatenating files is undesirable.
This fixes a bug where the output of the `StringMap` container would
have the index file appended to it, rendering an invalid tar.
2025-06-27 17:12:18 +02:00
Giacomo Vercesi 8c76e7d2ef Cleanup Storage classes
Due to the removal of `S3StorageClient`, simplify the infrastructure
under `/Storage/`:
* Move and rename `LocalStorageClient` to `StorageClient`, de-virtualize
  all of its methods
* Move and rename `LocalWritableFile`, `LocalReadableFile` to
  `WritableFile` and `ReadableFile`, de-vitualize all methods
* Drop the `Std{in,out}StorageClient`, make `FilePath` handle the
  stdin/stdout logic
* Remove `setStorageCredentials` from `PipelineManager`
2025-05-07 16:42:34 +02:00
Khaled Ismaeel a52f1f17c2 Add automatic migrations in PipelineManager 2025-04-30 15:08:45 +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 a9a0fdc236 ELFImport: fix input file missing
When using revng through `revng daemon` the variable `InputPath` is not
populated, leading to `lddtree` failing silently. Fall back to the input
binary in the resume directory in case the the `InputPath` variable is
empty.
2025-03-14 13:05:39 +01: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
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 a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Alessandro Di Federico 6297537486 Drop Pipe::print 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 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 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 05b6989274 FunctionPass: add tracing 2024-08-07 16:07:59 +02:00
Alessandro Di Federico 7b00473859 PDBImporter: rework .pdb search 2024-08-05 17:41:34 +02:00
Alessandro Di Federico c3733f293a s/RevngPasses/FunctionPass/g 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
Massimo Fioravanti 7ee8c8000d Introduce revng pipe 2024-06-20 09:57:36 +02:00
Alessandro Di Federico d9367954a4 Convert all public strings to kebab-case 2024-02-09 10:04:24 +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 b0614c3a4b Fix: isolated functions targets overappresented
Isolated functions no longer show up in the content of the pipeline
multiple times equal to the number of tags.
2023-11-06 14:33:56 +01:00
Giacomo Vercesi 94aa2b51d2 Add Context Global Index 2023-11-03 12:13:58 +01:00
Giacomo Vercesi 04698bb550 Return invalidations when deserializing container
When deserializing a container in the pipeline, return the invalidations
that have been caused by the container changing content.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi 4f94988a4d Add Globals Analyses
Add analyses that allow the modification of globals via the analysis
mechanism of Pipeline.
2023-11-03 12:13:58 +01:00
Giacomo Vercesi e2504dd6f2 Implement storage credentials update
Add the functionality to rev.ng's infrastructure to allow to dynamically
update the credentials of the underlying storage provider at runtime.
2023-09-14 17:32:08 +02:00
Giacomo Vercesi 2a239ddf47 Introduce PipelineDescription
Add the PipelineDescription object that describes the structure of a
pipeline. This will be used by all the downstream users instead of
pipeline accessor methods via PipelineC.
2023-09-14 15:44:33 +02:00
Giacomo Vercesi 0b2754c824 pipeline: drop Disk from storage methods
This commit changes the following method names across the codebase:
* `storeToDisk` -> `store`
* `loadFromDisk` -> `load`
This has been done since the storage is no longer bound to the local
storage.
2023-09-06 15:23:43 +02:00
Giacomo Vercesi 93d3a6238d revng: introduce S3 support
Add the capability for all revng tooling to run with an S3-backed
workdir.
2023-09-06 15:23:43 +02:00
Pietro Fezzardi 851771eaa5 Improve tracing 2023-09-06 12:59:10 +02:00
Alessandro Di Federico b8b483d052 Minor changes 2023-08-23 16:14:04 +02:00
Alessandro Di Federico 14525d91f5 Adopt llvm::Task 2023-08-01 10:51:16 +02:00