186 Commits

Author SHA1 Message Date
Ivan Krysak 5ddde903c5 emit-c-as-directory: move to new backend 2026-06-15 17:28:22 +02:00
Ivan Krysak a12880aa27 Append legacy- to the old pipes 2026-06-15 17:28:22 +02:00
Ivan Krysak ea785998ec Minor improvements 2026-06-15 11:47:41 +02:00
Pietro Fezzardi 8de85c25a0 Remove array field of opaque struct types 2026-05-13 08:51:25 +02:00
Pietro Fezzardi 5a429d6f52 Add OpaqueType ranks
Define a new "opaque-type" rank in revng/Pipes/Ranks.h, keyed by
the byte size of the wrapped type. This rank is used by upcoming
commits to identify the artificial structs that wrap model array
types in Clift.
2026-05-08 11:37:10 +02:00
Ivan Krysak f3df0e20b9 Minor improvements 2026-04-21 07:54:50 +00:00
Ivan Krysak 2d2ba9c107 Split clift kinds into two: module and function 2026-03-25 15:42:13 +00:00
Giacomo Vercesi 6ec9f9a952 TupleTree: overhaul reference caching
Overhaul the logic and method names involved in enabling and disabling
reference caching in `TupleTree<T>`. `TupleTreeReference<T, U>` now
lazily caches the target and will traverse the path only when needed.
Also expose and use these functions in the new pipeline, which should
provide some speedup when executing a `Schedule`.
2026-03-04 14:58:02 +01:00
Ivan Krysak c1f05e4d24 Ranks: introduce the macro location 2026-02-27 18:28:12 +00:00
Ivan Krysak f0e00d66ab Do not use doxygen for TODOs 2026-02-25 12:47:27 +01:00
Lauri Vasama b0139bd5e5 Add stack frame variable rank 2026-02-13 08:41:39 +02:00
Alessandro Di Federico 1dff54ba60 Make new backend independent from the old one 2025-12-03 17:59:18 +01:00
Giacomo Vercesi 0758a95110 Add AttachDebugInfo to pypeline 2025-11-18 17:47:54 +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
Giacomo Vercesi e57442fafe Introduce Tar.h
Split off the `GzipTarReader` into `Tar.h`, include a normal
`TarWriter` class which leverages libarchive to generate the tar file.
2025-10-16 16:08:05 +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 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 b656381ec5 Update ptml documentation
This also reorders definitions in `revng/Pipes/Ranks.h` to match
the order used by the docs.
2025-07-23 11:38:53 +02:00
Ivan Krysak 90862b68ed StringBufferContainer: fix StartingContent 2025-07-23 11:38:53 +02:00
Ivan Krysak 116c8675db Ranks: greatly improve documentation 2025-07-23 11:38:52 +02:00
Ivan Krysak fd1ed20852 Ranks: update local variables and goto labels
Then now use corresponding model keys instead of raw names.
2025-07-23 11:38:51 +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
Lauri Vasama 74588ae684 Rename MLIRFunctionKind to CliftFunction 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
Ivan Krysak 6fd6a0af43 Pipes: add a rank for raw stack arguments 2025-05-08 15:42:00 +02:00
Ivan Krysak 66b42298de PTML: Emit a location for statement comments 2025-05-08 15:42:00 +02:00
Giacomo Vercesi 0c74c36e79 CLI: check that --resume is not a file
Add a check for command-line tools which returns an error in case the
command-line supplied `--resume` points to a file.
2025-05-07 16:42:34 +02:00
Giacomo Vercesi 79272adc9d CLI: check that FilePaths are actually files
Add checks that return an `llvm::Error` in case a provided path is a
directory in the case a `FilePath` was requested.
2025-05-07 16:42:34 +02:00
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