Commit Graph

595 Commits

Author SHA1 Message Date
Giacomo Vercesi 36f9dfe45b tests: leave TODO in tests to port/drop
Add TODOs to the test yamls of tests that are yet to be ported to the
new pipeline, the new backend or will be removed indefinitely when the
old pipeline is removed.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 26eca524d0 compare_isolate: exclude attributes
Blank out attribute identifiers and exclude attribute declaration lines,
as they might be swapped between executions.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 2a5c58791d Port tests to the new pypeline
Port as many tests as possible to use the `revng2`.
2026-03-05 14:23:06 +01:00
Giacomo Vercesi 4757cad690 pipeline-comparison: remove use of {push,pod}d 2026-03-04 14:58:02 +01:00
Giacomo Vercesi 807a240c4c Revert "Remove use of PIE compiler options"
This reverts commit f9ac4db8ba.
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 95650e593d primitive-types.h: include stdbool.h 2026-02-25 14:10:44 +01:00
Ivan Krysak 1c3d11096d primitive-types.h: define NULL if absent 2026-02-25 14:10:44 +01:00
Ivan Krysak 22fe32afa2 Minor improvements 2026-02-25 12:47:27 +01:00
Ivan Krysak b5f98fcae9 check-conventions: ban anonymous header namespaces 2026-02-25 12:47:27 +01:00
Ivan Krysak a1f2853a04 check-conventions: reallow namespace x = a::b 2026-02-25 12:47:15 +01:00
Giacomo Vercesi 5ed18e65b7 docs: drop use of orc shell 2026-02-16 14:01:04 +01:00
Giacomo Vercesi 728ee2bb96 Add end-to-end test for --debug 2026-02-16 12:17:56 +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 f9ac4db8ba Remove use of PIE compiler options
The position-indipendence of the code is set by the build environment.
2026-02-16 10:34:38 +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 01e9de1c34 compare_isolate.sh: don't compare declarations 2026-02-05 10:20:45 +01:00
Alessandro Di Federico f443bcc6da Model migration tests: suppress output 2025-12-22 11:34:46 +01:00
Alessandro Di Federico ce4f6ef996 llvmName: turn into a free function 2025-12-22 11:34:46 +01:00
Alessandro Di Federico 9d76a2ff52 for-collect-cfg: test Windows dynamic calls 2025-12-22 11:31:54 +01:00
Giacomo Vercesi 664eb497c1 isolate: selectively clone helpers
When performing `cloneFiltered`, instead of cloning all the helper
functions only clone those that are transitively called from the isolated
function.
2025-12-19 10:29:28 +01:00
Alessandro Di Federico 5820908675 Remove and ban \file 2025-12-16 17:41:55 +01:00
Giacomo Vercesi 94b9ecad6c mass-testing: exclude paths from flamegraph
Add a new option to the mass-testing `meta.yml` that allows skipping
some paths when generating the flamegraph. In the case of revng this
allows skipping the intermediate python frames.
2025-12-12 15:46:49 +01:00
Giacomo Vercesi 793b8999e9 Adapt mass-testing infrastructure to pypeline
Make the required changes so that `revng2` can be used with mass-testing
and the per-component stats are correct.
2025-12-12 15:46:49 +01:00
Giacomo Vercesi e3b263d9da Implement revng2 project init 2025-12-10 16:16:14 +01:00
Giacomo Vercesi 47038d46ec Add ParseBinaryAnalysis to pypeline 2025-12-10 15:05:53 +01:00
Giacomo Vercesi 27f2407a36 pypeline-comparison: omit metadata in lift
Do not compare metadata when comparing `lift` as the output is still
non-deterministic in some instances.
2025-12-10 15:05:53 +01:00
Lauri Vasama 40e1ad5d23 Add -Wno-array-bounds for check-decompiled-c 2025-12-05 19:53:41 +02:00
Lauri Vasama d4114ae188 Implement bit_cast in Clift backend 2025-12-05 19:53:41 +02:00
Alessandro Di Federico 5045506ce0 model-migration: use no-op analysis 2025-12-03 17:59:19 +01:00
Alessandro Di Federico 4c833e6227 emit-c: add peephole-opt-* and ternary-reduction 2025-12-03 17:59:19 +01:00
Alessandro Di Federico f435443630 tests: adopt emit-c over decompile 2025-12-03 17:59:19 +01:00
Alessandro Di Federico aa4120e1e2 tests/scripting.py: drop decompile, use emit-c 2025-12-03 17:59:19 +01:00
Tommaso Fontana fe3a5b6287 Pypeline: add --tar, --yaml to pype commands
Now commands 'pype project artifact' and 'pype pipeline run_pipe' now
accepts --format to specify in which format to serialize the resulting
container, and have --tar and --yaml shortcuts. Moreover, these commands
and 'pipe pipeline run_analysis' can automatically figure out the format
of containers so the user won't have to specify them most of the time.
2025-11-24 16:41:15 +01:00
Giacomo Vercesi e32c92b164 Add pypeline comparison tests
Add a set of tests to the test suite that compare the output of the new
pipeline (via `revng2`) to the output of the old one.
2025-11-18 17:47:54 +01:00
Giacomo Vercesi 57ae281403 verify-abi-test-binaries: remove orc shell
`orc shell` should not be used in the revng codebase in general,
moreover the PATH already contains all the entries needed to invoke the
`llvm-dwarfdump` command.
2025-11-17 10:04:12 +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
Alessandro Di Federico 90f21a10a8 check-conventions: enable excluding specific files 2025-10-28 09:18:24 +01:00
Alessandro Di Federico 81f063d30c Old backend: suppress -Wshift-count-overflow 2025-10-24 18:21:13 +02:00
Ivan Krysak 8bbbe10396 Ban unwrapped IRBuilder 2025-10-21 19:17:08 +03:00
Lauri Vasama 2b8701bb94 Add Clift optimization pipe 2025-10-21 09:15:40 +02:00
Lauri Vasama bf5adce413 Overhaul Clift loop syntax, add break/continue 2025-10-21 09:15:40 +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
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 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 2d618120e0 TTG: add default: value support
This also unifies `get_default_value` helper across all the target
languages.

Before this, there were two different versions of it for python
and typescript while c++ side didn't have one at all.
2025-10-13 18:33:10 +03:00
Ivan Krysak 23a0a09d21 TTG: add --string-type support to cpp generator
Note that other code-generating TTG-backends (namely python and
typescript) emitting ones already support this. This is just a matter
of extending similar logic to the c++ backend.
2025-10-13 18:33:10 +03:00
Ivan Krysak 859e122081 EFA: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.

This also fixes test failures related to the changed serialization
format (which fields can or cannot be omitted when they have
the default value).
2025-10-13 18:33:10 +03:00
Ivan Krysak 6c0c758e67 Model: make TTG verification more strict
Some stuff that was before implicitly checked during deserialization
now need explicit checks, those are introduced here.

This also fixes test failures related to the changed serialization
format (which fields can or cannot be omitted when they have
the default value).
2025-10-13 18:33:10 +03:00
Ivan Krysak cc57e57fd1 TTG: remove support for optional: true fields
After this commit, every non-key field is treated as if it was optional
while every key field (plus every auto-generated `Kind` field) - as if
it was required.
2025-10-13 18:33:10 +03:00