79 Commits

Author SHA1 Message Date
Pietro Fezzardi 6a3ab92a9d Mark to-be-dropped pipeline names as legacy
Several components in both pipeline YAMLs are slated for removal.
Prepend a legacy prefix to their names, and to the matching c++ code, so
they are clearly distinguished from the new Clift-based pipeline until
they are dropped.
2026-06-15 17:28:22 +02:00
Alessandro Di Federico e44c04925e developer-manual/qemu-helpers.md: update 2026-06-15 17:28:22 +02:00
Ivan Krysak 37c2cb12ed test-docs: use new pipeline 2026-06-15 17:28:22 +02:00
Ivan Krysak cabbe4d6e6 Tests: use new header pipes 2026-06-15 17:28:22 +02:00
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
Alessandro Di Federico 841b5dab71 SegregateStackAccesses: rewrite around ExtraState
Move all per-function state and logic into a new SegregateFunctionStack
worker, so the pass class itself only holds module-wide state and the
runOnFunction body is just upgrade() + segregate(). The discovery loop
now uses the MFP ExtraState surface to capture the analysis value
before each interesting program point, replacing the splitBasicBlock
trick that introduced fake nodes only to read the lattice value at
them.

Other changes that ride along:
- StackOffsetCache memoizes getStackOffset per function.
- findAllWriters does a single sorted sweep instead of a quadratic
  scan over Ranges.
- The pipeline gains a stack-accesses-segregated artifact entry.
- Test fixtures (filecheck.ll, override.yml, segregate-stack-accesses
  configuration) are updated to match the new IR shape.
2026-06-11 17:39:53 +02:00
Andrea Gussoni 9b5eb460e0 docs: tested docs for QEMU helper functions
Walks through the full helper evolution pipeline (QEMU C ->
original IR -> full -> to-inline -> declarations-only), covering
env-to-CSV rewriting by fix-helpers, REVNG_INLINE/REVNG_EXCEPTIONAL
semantics, CSV access metadata, and per-artifact usage (lift,
enforce-abi, recompile).

All code snippets are tested via revng test-docs.
2026-05-29 17:12:35 +02:00
Lauri Vasama c7e3a12657 Add implicit cast elision pass 2026-05-04 10:49:07 +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 5b43a23060 BinaryIdentifier: s/.Name/.CanonicalPath/g 2026-04-23 13:40:42 +02:00
Ivan Krysak 7edc4b3da6 CEmitter: emit function type attributes 2026-04-22 08:19:28 +00:00
Giacomo Vercesi a8e13e4ee7 docs: fix
Fix the docs so that `revng test-docs` passes. Rework the
`model-from-scrach.md` to use the new pipeline.
2026-04-10 11:45:13 +02:00
Ivan Krysak 754cfd57fe Model: introduce migration to version 9 2026-03-27 08:19:21 +00:00
Ivan Krysak c1f05e4d24 Ranks: introduce the macro location 2026-02-27 18:28:12 +00:00
Giacomo Vercesi 5ed18e65b7 docs: drop use of orc shell 2026-02-16 14:01:04 +01:00
Lauri Vasama aa2597d13b model::Function: add stack frame name and comment
* StackFrameType() is removed.
* StackFrame() is introduced in its place.
* Use StackFrame().Type() to acess the stack frame type.
2026-02-13 08:41:39 +02:00
Giacomo Vercesi 40da49548b Add Binaries list to the model
Add to the model an entry detailing the list of input binaries under
`Binaries`. This will be referenced by `Segments` when needed.
2025-10-16 17:48:45 +02:00
Ivan Krysak 45cc832602 Docs: do not spell default values
Note that a seemingly random relocation appeared from who knows where,
I wonder what's going on with it.
2025-10-13 18:33:10 +03:00
Ivan Krysak ed53e759c9 Do not use -Y flag
Yaml model are now the _only_ way to store them, no point in still
specifying the old flag for it.
2025-10-13 10:26:41 +03:00
Lauri Vasama 653d451e6c Remove undef name configuration support
Also adds a model migration removing
Configuration.Naming.UndefinedValuePrefix.
2025-09-29 18:05:55 +03:00
Ivan Krysak 8cc4082223 model-from-scratch: fix a broken link 2025-09-12 18:57:48 +03:00
Ivan Krysak 3c8ca061ef model-from-scratch: improve wording 2025-09-12 18:57:31 +03:00
Pietro Fezzardi 37cadeabd4 PTML doc: clarify supported and allowed actions 2025-09-10 18:48:06 +02:00
Pietro Fezzardi 82d0a17fe0 PTML doc: attribute categories are indepenent 2025-09-10 18:48:05 +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 461c49df25 Model: bump version to 5 and introduce migration 2025-07-23 11:38:52 +02:00
Giacomo Vercesi 29d7f2d8a8 artifacts: allow parsing the recompilable archive
Allow the artifacts machinery to parse, via `pycparser`, the
recompilable archive provided by revng via the
`emit-recompilable-archive` artifact.
2025-07-18 09:30:56 +02:00
Giacomo Vercesi 460ffbf965 project: move some methods to Binary
Move some methods from the `Project` class to `model.Binary`.
2025-07-18 09:30:55 +02:00
Alessandro Di Federico 4378576eed Python scripting: get_example_binary{,_path} 2025-07-18 09:29:09 +02:00
Lauri Vasama e9b18d448b Add Clift emit-c pipe and end-to-end tests 2025-07-17 16:45:03 +02:00
Lauri Vasama 9d39020034 Add LLVM-to-Clift import pipe 2025-07-17 16:45:03 +02:00
Ivan Krysak 63bf36621c Docs: update the supported location list 2025-05-08 15:42:01 +02:00
Ivan Krysak 6fd6a0af43 Pipes: add a rank for raw stack arguments 2025-05-08 15:42:00 +02:00
Ivan Krysak 0d868894a2 model::Function: switch to indices as comment keys 2025-05-08 15:42:00 +02:00
Giacomo Vercesi 89b17d2325 Python client: add user manual 2025-05-07 12:04:15 +02:00
Giacomo Vercesi 591107cdce Overhaul PTML functionality
The logic of the `revng ptml` command was too tightly coupled with the
parsing of the xml. Overhaul the structure of the ptml code and split it
in two locations:
* `revng.ptml`: this module contains functions that allow easy
  manipulation of PTML, both for printing it and for obtaining the split
  metadata/text version.
* `revng.internal.cli._commands.ptml`: this implements the actual `revng
  ptml` command. This leverages the new logic in the `revng.ptml` module
  while maintaining the same functionality.
2025-05-05 17:28:48 +02:00
Giacomo Vercesi 6f481a3127 docs: fix tip admonition
Fix the tip admonition using the `:::` marker which is incorrect. Use
the `!!!` marker which is the correct one.
2025-05-05 16:02:40 +02:00
Khaled Ismaeel 030becfeba Adapt the build to the new schema version field
This is a followup to the commit where we introduced the `version`
field in the schema YAML.
2025-04-30 15:08:45 +02:00
Ivan Krysak f070f1f1e1 Model: sunset double name system 2025-04-17 11:19:17 +03:00
Ivan Krysak a93ffd3760 Rename UnusedStackArgumentBytes
Old name was `StackBytesAllocatedForRegisterArguments`.
2025-02-12 16:43:19 +02:00
Pietro Fezzardi 1f0c8e1ae5 Pipeline: remove import-clift-types Pipe
At the moment this pipe is broken, because it claims to be producing
artifacts with function rank, while it only produces types.

This pipe should be extended and turned into a pipe that generates
the whole Clift module including functions from LLVM IR, and not just
types.

We should add an input LLVMContainer, and the run() method should first
import types, and then create the functions and their bodies.

For the time being the Pipe is removed from the pipeline.
2025-01-29 23:55:49 +01:00
Pietro Fezzardi 9e0f015eb8 Drop old conversion from LLVM to MLIR
The previous conversion from LLVM to MLIR was translating plain LLVM IR
to LLVM MLIR Dialect, as a preliminary step for further conversion from
LLVM MLIR Dialect to Clift.
This is not how things are expected to work anymore, so the old code is
now dead and can be removed.
2025-01-29 23:55:49 +01:00
Pietro Fezzardi 186798c2aa Add initial part of clift-based decompilation 2025-01-29 23:55:49 +01:00
Alessandro Di Federico dfe0970715 FromUnusedAddressesPass: use simple literals
Consider simple literals as candidates for the second run of function
collection.
2025-01-28 15:20:45 +01:00
Alessandro Di Federico 797ad1678b Document CLI commands 2024-12-11 16:15:43 +01:00
Alessandro Di Federico 620d142d53 Reroganize and expand documentation 2024-12-11 16:15:37 +01:00
Alessandro Di Federico d2d32b304e Model: improve documentation 2024-12-11 16:15:09 +01:00
Alessandro Di Federico 686083bdab Remove mentions to revng-c 2024-11-21 15:54:23 +01:00
Ivan Krysak a67ba96644 Adopt name builder across the model users 2024-11-06 15:43:13 +02:00