400 Commits

Author SHA1 Message Date
Giacomo Vercesi 49b2c523ab Add revng merge llvm command
Add the `revng merge llvm` command which allows linking multiple LLVM
IR modules together into a single module.
2026-06-19 15:35:18 +02:00
Alessandro Di Federico 03e02771ac Add model drop-types tool 2026-06-03 13:59:53 +02:00
Alessandro Di Federico 8a28920773 Move *LDDTree* to Model/Importer/Binary 2026-05-15 11:27:33 +02:00
Lauri Vasama 04fe27b8e9 Migrate Clift users to CDataModel 2026-05-04 10:49:03 +03:00
Lauri Vasama a338194eb7 Move namespace mlir::clift out of namespace mlir 2026-04-27 12:48:24 +03:00
Alessandro Di Federico 6894862ef2 Implement platform roots support
Refactor the binary import and dependency resolution infrastructure to
support multiple platforms (Linux, Windows, macOS) via a
configuration-driven root system.

Major changes:

* Overhaul PDB and DWARF importers for platform-aware debug info
  loading.
* Refactor LDDTree into a template-based architecture with
  platform-specific implementations (ELF, PE/COFF).
* Mostly rewrite the PDB importer, which had significant limitations.
2026-04-24 17:54:09 +02:00
Alessandro Di Federico 292da676e2 Introduce revng model merge 2026-04-23 13:40:43 +02:00
Alessandro Di Federico eb9e82477a Introduce WindowsApiSetSchemaParser 2026-04-23 13:40:43 +02:00
Alessandro Di Federico 0742699a81 s/OutputFilename/OutputPath/g 2026-04-23 13:40:42 +02:00
Alessandro Di Federico 934e2a92f5 Make argv non-const char * 2026-04-23 13:40:42 +02: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
Giacomo Vercesi f1878f1194 pypeline: drop TraceRunner
Drop the `pypeline-trace-run` executable, as its purposed has been
superseded by the combination of `--debug` and native pipe/analysis
runners.
2026-02-16 10:34:39 +01:00
Giacomo Vercesi 25ba3115c4 pypeline: implement native run-{pipe,analysis}
Implement C++-only command-line executables that allow running a single
pipe/analysis without the involvement of python.
2026-02-16 10:34:38 +01:00
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
Giacomo Vercesi 265af3768f Binary importers: fix debug info detection
Fix the behavior of binary importers by propagating the path of the
input binary from revng2 downwards, allowing finding `.debug` files in
the correct paths.
2025-12-19 10:28:29 +01:00
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Lauri Vasama 0fe8c448a9 Remove unused dialects from clift-opt 2025-11-12 15:28:54 +02:00
Lauri Vasama f6f3bc2dbc Add generic passes in clift-opt 2025-11-12 15:28:54 +02:00
Alessandro Di Federico c883bed765 Drop Logger's StaticEnabled feature 2025-10-31 17:25:03 +01:00
Alessandro Di Federico 1429b526ab Introduce libtcg
This commit drops libptc in favor of its new form libtcg.

It brings several improvements, among which:

* The QEMU version we work on has been upgraded.
* CPUStateAccessAnalysis has been reimplemented in a way that makes it
  easier to debug and solves some limitations (e.g., tracking leaking
  pointers).
* Identification of pieces of the CPU state that are read by each helper
  and fixing access to the CPU state is now performed at build-time.
* We no longer mmap the code we need to translate, dropping all the
  issues related to code that needed to be mapped where something is
  already present.
* We now have two distinct flavors of helper modules: the full one and
  the "slim" one. The latter contains the definition only of functions
  we intend to inline. It is used in most of the pipeline, a good thing
  since we spend less time optimizing code we don't really care about.
  The full module is only used on the re-compilation branch of the
  pipeline.
* We no longer split the `cpu_loop` function.
* We change MetaAddress to rely on architectures from `model::` as
  opposed to the LLVM ones.
* We no longer attach debug info to LLVM IR containing the original
  assembly.
* We now verify that the lifted code only contains code we expect.
2025-10-31 17:25:03 +01:00
Giacomo Vercesi f165f99392 pypeline.Model: make deserialize to static
Change the `Model.deserialize` to a static function, which will return
a new instance of the Model.
2025-10-16 10:30:01 +02:00
Lauri Vasama 22d6f70ee2 Clift directory structure overhaul 2025-10-13 15:08:20 +02:00
Lauri Vasama 3c191122dc Rename Clift to CliftDialect, CliftOps to Clift 2025-10-13 15:08:20 +02:00
Ivan Krysak 5717d835f8 Add missing llvm::Error checks 2025-10-13 10:26:37 +03:00
Ivan Krysak 745b461568 Tools: use llvm::ExitOnError 2025-10-08 12:22:34 +03:00
Ivan Krysak a88747cf99 Drop unused includes 2025-10-08 12:22:34 +03:00
Ivan Krysak d1fbf2eee6 Model: Drop ToolHelpers.h 2025-10-08 12:22:34 +03:00
Ivan Krysak 77ea07c364 Minor improvements 2025-10-08 12:22:30 +03:00
Giacomo Vercesi 448f70e7dc Add trace runner
Add the tool `pypeline-trace-runner` which allows reading a serialized
pypeline schedule and execute it purely in C++.
2025-09-17 14:09:16 +02:00
Ivan Krysak dbd8a720b7 Reduce using namespace abuse 2025-09-10 17:44:02 +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
Lauri Vasama 4380f374b1 Fix revng pipe output container targets
Previously revng pipe did not correctly propagate targets from input
containers into output containers based on the pipe contract. This
happened to work for pipes acting on LLVM containers where the same
container is used for input and output, but failed for the Clift backend
pipe, where an MLIR container is used for input and a string map
container is used for output.
2025-06-04 15:13:47 +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
Giacomo Vercesi 0f6b6e00bd Add revng init
Add a new `revng` command that allows to initialize a resume directory.
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
Ivan Krysak 6a6b34b831 Introduce a general static registry helper 2025-04-17 11:19:17 +03:00
Ivan Krysak 705e4a5955 auto [...] -> auto &&[...] 2025-02-13 13:10:51 +02:00
Lauri Vasama ab9da50e68 Remove unreachable return in clift-opt 2025-01-10 08:03:20 +02:00
Alessandro Di Federico 143c315196 Merge revng-c into revng 2024-11-21 10:50:55 +01:00
Ivan Krysak 2be6f4aebb TypeSystemPrinter: adopt name builder 2024-11-06 15:43:13 +02: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 bf9ef91f4e Drop revng model import binary 2024-10-16 11:46:56 +02:00
Alessandro Di Federico 48dd571500 Drop revng model dump 2024-10-16 11:44:26 +02:00
Alessandro Di Federico a0c670652c Improve usages of Expected<T> 2024-10-10 14:50:26 +02:00
Ivan Krysak 99e016f120 ABI: reorganize default ABI helpers 2024-10-08 13:53:52 +02:00
Giacomo Vercesi 683bcf66d8 Drop revng- prefix from libexec executables
The revng CLI driver no longer uses the `revng-` prefix for executables
under `libexec/revng`.
2024-10-01 20:34:38 +02:00
Giacomo Vercesi 993f66d59c revng cli: drop revng- prefix from libexec
Drop using the `revng-` prefix from all executables under
`libexec/revng/`. Now any executable found under there that is
executable and without extension will be considered a `revng`
subcommand, following the usual command-line rules.
2024-10-01 13:38:14 +02:00
Alessandro Di Federico bc064244d6 s/deserialize/fromString/g 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