Commit Graph

39 Commits

Author SHA1 Message Date
Giacomo Vercesi d81dc49809 revng-check-conventions: license check 2022-04-20 09:55:18 +02:00
Antonio Frighetto dddd8ecbcb Update EFA tests to support CFG out of the model 2022-04-05 15:37:57 +02:00
Antonio Frighetto c223b0aadc Fix end address in EFA tests 2022-04-05 15:37:57 +02:00
Antonio Frighetto bb7102f647 Move old tests to EarlyFunctionAnalysis 2022-04-05 15:37:57 +02:00
Massimo Fioravanti c05b5dbb28 Steps now represent the *end* of a step
A special "begin" step has been introduced.
2022-03-28 12:17:05 +02:00
Massimo Fioravanti b362d926ec pipeline: drop implicit rank 0 2022-03-28 12:17:05 +02:00
Filippo Cremonese 70a460c46a TupleTreeGenerator: use dataclasses
Give up on pydantic.
2022-03-22 17:52:02 +01:00
Alessandro Di Federico 2b55d1df22 Adopt cmake-format 2022-03-17 18:52:18 +01:00
Alessandro Di Federico 6832698e5b Introduce revng llvm pipeline
This is a wrapper to `revng-pipeline` designed to make the adoption of
pipelines easier for places where we are now using `revng opt`.
2022-03-17 16:46:02 +01:00
Alessandro Di Federico af6305725d Rewrite revng driver infrastructure
It really needed some fresh air.
2022-03-17 16:46:00 +01:00
Alessandro Di Federico cd7f1fced5 Update test results 2022-03-08 20:57:46 +01:00
Alessandro Di Federico c0f8110e4e s/revng-compare-yaml/revng-model-compare/ 2022-01-31 16:28:17 +01:00
Alessandro Di Federico 0d7decccb3 s/revng-dump-model/revng-model-to-json/ 2022-01-31 16:28:17 +01:00
Alessandro Di Federico 3d1df0ab7d Use OriginalName in tests/analysis/*.yml 2022-01-27 11:51:03 +01:00
Alessandro Di Federico fc02a84436 Test generated model can be loaded
This ensure we catch bugs in model deserialization early, while usually
they pop up in revng-c, which doesn't make much sense.
2022-01-13 14:34:11 +01:00
Alessandro Di Federico 6073133545 CodeGenerator: drop IR emission duties 2021-12-22 17:47:54 +01:00
Alessandro Di Federico c64223a80c mv scripts/{,revng-}compare-yaml 2021-12-17 18:50:49 +01:00
Antonio Frighetto 10f45c593a Move StackAnalysis to EarlyFunctionAnalysis 2021-12-15 18:03:30 +01:00
Antonio Frighetto ffd5ac7f57 Drop old StackAnalysis 2021-12-15 18:03:30 +01:00
Antonio Frighetto 9767f4975b Artifacts for EarlyFunctionAnalysis 2021-12-15 18:03:30 +01:00
Alessandro Di Federico f4d09bc5ff Improve scripts/compare-yaml
* Rename from compare-json.py to compare-yaml
* Handle YAML
* Support certain characteristics of the model
* Use subgraph matching to perform comparisons
* Introduce some testing
* Drop Python 2 support
* Reformat
2021-12-15 18:03:30 +01:00
Alessandro Di Federico 2c7fa21065 Enable -inline-helpers 2021-04-30 14:52:25 +02:00
Alessandro Di Federico 53f6328507 Introduce PromoteCSVs
This commit takes out of EnforceABI the part taking care of creating
wrappers for calls to helpers and promoting CSV to local variables.
This decoupling, enables to run -promote-csvs multiple times, for
instance after inlining.
2021-04-22 18:07:24 +02:00
Alessandro Di Federico 2b9cbb98ec Introduce --invoke-isolated-functions
This commit ensures that FunctionIsolation and EnforceABI do only
thing. This means that they no longer modify `root`.

Instead, we have a new pass, `invoke-isolated-functions` that needs to
be run after them and replaces the entry point of the functions with
invokes to the isolated functions, possibly with the appropriate
arguments.
2021-04-22 14:45:52 +02:00
Alessandro Di Federico 40ecee6482 Make SA tests more deterministic
When we compare StackAnalysis test results, the order in which things
appear in the JSON is relevant. However, the output was
non-deterministic due to a `std::map` using a pointer as key.

This commit improves the situation by sorting the elements by name
before dumping them in JSON.
2021-04-22 14:45:52 +02:00
Alessandro Di Federico 8b5a462187 AVI: use TypeShrinking
This enables us to handle situations where the comparison against the
switch value is performed on the lower 32 bits, but the address
computations uses the full 64 bits.

    cmp    edi,0x23
    ja     ...
    movsxd rdx,DWORD PTR [rcx+rdi*4]

Note that this does not solve all these situations yet.

This commit also introduces a reference output for the new
switch-jump-table-32-bit-comparison test case.
2021-03-08 10:15:50 +01:00
Alessandro Di Federico 4780457c53 Drop StackAnalysis<false> and FBDP
This commit drops support for running StackAnalysis without ABI
analysis. This has been broken for quite some time and a source of slow
downs in (badly) crafted optimization pipelines.
2021-03-06 17:35:30 +01:00
Alessandro Di Federico 27b58695a1 Let FunctionIsolation and EnforceABI use the Model 2021-02-19 09:39:49 +01:00
Alessandro Di Federico a655507a0c Use relative paths during builds 2021-01-27 19:46:53 +01:00
Alessandro Di Federico 2e995fdaa7 Pretty print JSONs 2020-10-22 11:25:31 +02:00
Alessandro Di Federico 078daef537 More robust StackAnalysis test reference results
We recently bumped the GCC version used for the x86-64 toolchain. The
newer version makes slightly different choices of instruction breaking
the names of basic blocks.

This commit drops them, since they are not really necessary: checking
the order is already more than enough.
2020-10-22 11:22:26 +02:00
Alessandro Di Federico 782eb09ffc Switch to produce bitcode where possible 2020-10-21 10:34:34 +02:00
Alessandro Di Federico 0e4c4aad59 Make --use-debug-symbols the default 2020-10-21 10:34:34 +02:00
Alessandro Di Federico 85ec2e2e05 Produce artifacts for decompilation 2020-09-04 23:54:26 +02:00
Alessandro Di Federico 270595632c Fix dependencies for revng-qa artifacts 2020-09-04 23:52:45 +02:00
Alessandro Di Federico 9401e33d3f Re-enable working tests
Some tests have been disabled in the past, but they work.
Specifically, this commit re-enables the `memset` and `fibonacci` tests.
The commit also describes why the test remaining disabled are so.
2020-06-02 21:14:57 +02:00
Alessandro Di Federico 99486d0b6b Update tests' references after new dispatcher 2020-06-02 10:57:02 +02:00
Alessandro Di Federico c1a768ff21 Drop InstructionTranslator::ForceNewPC
It was a leftover for a problem (marking post-helper addresses as jump
targets) that we appear to have solved in another way.
2020-03-02 12:38:01 +01:00
Alessandro Di Federico 12d093b459 Rethink testing
This commit performs the changes necessary in order to integrate with
revng-qa, the new project for cross-project quality assurance.

Basically, the source code of all the tests has been moved in revng-qa,
which will take care of producing "artifacts" (i.e., compiled programs),
using the appropriate cross-compilers.

revng will then consume them and produce new artifacts to be consumed by
other tools down the pipeline.

The directory structure of the tests has been reworked to reflect
`revng-qa`. A large amount of boilerplate code has been dropped.

Note that certain actions, that used to be carried out during testing,
are now part of the regular build process. Specifically, lifting the
tests is performed at build time, so that they can be installed.
2020-02-20 12:16:56 +01:00